Class InMemoryByteStringKvTable<T>

  • All Implemented Interfaces:
    KvTable<T>

    public class InMemoryByteStringKvTable<T>
    extends java.lang.Object
    implements KvTable<T>
    • Constructor Detail

      • InMemoryByteStringKvTable

        public InMemoryByteStringKvTable()
    • Method Detail

      • open

        public int open​(java.lang.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 java.lang.String getTableName()
        Specified by:
        getTableName in interface KvTable<T>
      • setVarKeyType

        public void setVarKeyType​(java.lang.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>
      • 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>
      • 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>
      • 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)