Class DictionaryLinkTable

java.lang.Object
org.gorpipe.gor.table.files.DictionaryLinkTable
All Implemented Interfaces:
org.gorpipe.gor.table.Table

public class DictionaryLinkTable extends Object implements org.gorpipe.gor.table.Table
LinkTable consist of a link and the the actual data. The link is used as the a standard table and is named and located like a standard table. The actual data might be in S3 or a data folder and should normally not be used directly. The link table is updated by creating new data and then update the link. Using link tables allow us to update data using S3 in simlilar way has is standard practice in NFS (create new temp file and then to an atomic move from the temp file to the data file)
  • Constructor Details

    • DictionaryLinkTable

      public DictionaryLinkTable(URI uri, org.gorpipe.gor.model.FileReader inputFileReader)
  • Method Details

    • link

      public void link(URI uri)
      Make this link table point to a new external dict.
      Parameters:
      uri -
    • deleteUnderlying

      public void deleteUnderlying()
    • getName

      public String getName()
      Specified by:
      getName in interface org.gorpipe.gor.table.Table
    • getPath

      public Path getPath()
      Specified by:
      getPath in interface org.gorpipe.gor.table.Table
    • getFolderPath

      public Path getFolderPath()
      Specified by:
      getFolderPath in interface org.gorpipe.gor.table.Table
    • getColumns

      public String[] getColumns()
      Specified by:
      getColumns in interface org.gorpipe.gor.table.Table
    • getProperty

      public String getProperty(String key)
      Specified by:
      getProperty in interface org.gorpipe.gor.table.Table
    • setProperty

      public void setProperty(String key, String value)
      Specified by:
      setProperty in interface org.gorpipe.gor.table.Table
    • containsProperty

      public boolean containsProperty(String key)
      Specified by:
      containsProperty in interface org.gorpipe.gor.table.Table
    • getLines

      public Stream<String> getLines()
      Specified by:
      getLines in interface org.gorpipe.gor.table.Table
    • insert

      public void insert(Collection lines)
      Specified by:
      insert in interface org.gorpipe.gor.table.Table
    • insert

      public void insert(String... lines)
      Specified by:
      insert in interface org.gorpipe.gor.table.Table
    • delete

      public void delete(Collection lines)
      Specified by:
      delete in interface org.gorpipe.gor.table.Table
    • delete

      public void delete(String... lines)
      Specified by:
      delete in interface org.gorpipe.gor.table.Table
    • reload

      public void reload()
      Specified by:
      reload in interface org.gorpipe.gor.table.Table
    • save

      public void save()
      Specified by:
      save in interface org.gorpipe.gor.table.Table
    • delete

      public void delete()
      Specified by:
      delete in interface org.gorpipe.gor.table.Table
    • deleteEntries

      public void deleteEntries(Collection collection)
      Specified by:
      deleteEntries in interface org.gorpipe.gor.table.Table
    • insertEntries

      public void insertEntries(Collection collection)
      Specified by:
      insertEntries in interface org.gorpipe.gor.table.Table
    • commitRequest

      public void commitRequest()
      Specified by:
      commitRequest in interface org.gorpipe.gor.table.Table
    • commit

      public void commit()
      Specified by:
      commit in interface org.gorpipe.gor.table.Table
    • initialize

      public void initialize()
      Specified by:
      initialize in interface org.gorpipe.gor.table.Table
    • getRootPath

      public Path getRootPath()
      Specified by:
      getRootPath in interface org.gorpipe.gor.table.Table
    • getSecurityContext

      public String getSecurityContext()
      Specified by:
      getSecurityContext in interface org.gorpipe.gor.table.Table
    • setColumns

      public void setColumns(String[] columns)
      Specified by:
      setColumns in interface org.gorpipe.gor.table.Table
    • setFileReader

      public void setFileReader(org.gorpipe.gor.model.FileReader fileReader)
      Specified by:
      setFileReader in interface org.gorpipe.gor.table.Table