Class InMemoryByteStringKvTable<T>

java.lang.Object
com.mapr.kvstore.InMemoryByteStringKvTable<T>
All Implemented Interfaces:
KvTable<T>

public class InMemoryByteStringKvTable<T> extends Object implements KvTable<T>
  • Constructor Details

    • InMemoryByteStringKvTable

      public InMemoryByteStringKvTable()
  • Method Details

    • getKvVersion

      public long getKvVersion()
      Specified by:
      getKvVersion in interface KvTable<T>
    • open

      public int open(String name)
      Description copied from interface: KvTable
      Initializes in-memory state of the table, such as setting key type (where necessary).
      Specified by:
      open in interface KvTable<T>
      Parameters:
      name - name of the key-value table to be initialized
      Returns:
    • close

      public void close()
      Specified by:
      close in interface KvTable<T>
    • getTableName

      public String getTableName()
      Specified by:
      getTableName in interface KvTable<T>
    • setVarKeyType

      public void setVarKeyType(String type)
      Specified by:
      setVarKeyType in interface KvTable<T>
    • lookup

      public byte[] lookup(T keyValue)
      Specified by:
      lookup in interface KvTable<T>
    • lookup

      public byte[] lookup(T keyValue, boolean allowStaleRead)
      Specified by:
      lookup in interface KvTable<T>
    • exists

      public boolean exists(T keyValue)
      Description copied from interface: KvTable
      Cognate of KvTable.lookup(Object, boolean), this function checks for the presence of an entry with a specific key.
      Specified by:
      exists in interface KvTable<T>
      Returns:
    • getLeftNearValue

      public com.mapr.fs.proto.Fileserver.KvMsg getLeftNearValue(T key)
      Specified by:
      getLeftNearValue in interface KvTable<T>
    • getRightNearValue

      public com.mapr.fs.proto.Fileserver.KvMsg getRightNearValue(T key)
      Specified by:
      getRightNearValue in interface KvTable<T>
    • lookupNear

      public com.mapr.fs.proto.Fileserver.KvstoreLookupNearResponse lookupNear(T key) throws KvStoreException
      Specified by:
      lookupNear in interface KvTable<T>
      Throws:
      KvStoreException
    • getMinKey

      public com.mapr.fs.proto.Fileserver.KvStoreKey getMinKey()
      Specified by:
      getMinKey in interface KvTable<T>
    • getMaxKey

      public com.mapr.fs.proto.Fileserver.KvStoreKey getMaxKey()
      Specified by:
      getMaxKey in interface KvTable<T>
    • getKeyCnt

      public int getKeyCnt()
      Specified by:
      getKeyCnt in interface KvTable<T>
    • getKeyFromKvStoreKey

      public T getKeyFromKvStoreKey(com.mapr.fs.proto.Fileserver.KvStoreKey key)
      Specified by:
      getKeyFromKvStoreKey in interface KvTable<T>
    • getScanner

      public KvTableScanner getScanner(T startKey, T endKey, boolean keysOnly)
      Specified by:
      getScanner in interface KvTable<T>
    • getScanner

      public KvTableScanner getScanner(T startKey, boolean keysOnly)
      Specified by:
      getScanner in interface KvTable<T>
    • getScanner

      public KvTableScanner getScanner(boolean keysOnly)
      Specified by:
      getScanner in interface KvTable<T>
    • setType

      public void setType(int type)
      Specified by:
      setType in interface KvTable<T>
    • insert

      public com.google.protobuf.ByteString insert(com.google.protobuf.ByteString key, com.google.protobuf.ByteString value)
    • delete

      public com.google.protobuf.ByteString delete(com.google.protobuf.ByteString key)