Class RecordFactory


  • public final class RecordFactory
    extends java.lang.Object
    Record creator
    • Constructor Detail

      • RecordFactory

        public RecordFactory​(int keyLength,
                             int valueLength)
    • Method Detail

      • keyFactory

        public RecordFactory keyFactory()
        Return a RecordFactory that makes key-only records of the same key size
      • createKeyOnly

        public Record createKeyOnly()
        Create a key-only record, allocating blank space for the key
      • createKeyOnly

        public Record createKeyOnly​(Record record)
        Create a key-only record
      • create

        public Record create​(byte[] key)
        Create a key and value record (value uninitialized)
      • create

        public Record create()
        Create a record, allocating space for the key and value (if any)
      • create

        public Record create​(byte[] key,
                             byte[] value)
        Create a key and value record
      • insertInto

        public void insertInto​(Record record,
                               java.nio.ByteBuffer bb,
                               int idx)
      • access

        public <X> X access​(java.nio.ByteBuffer bb,
                            int idx,
                            byte[] keyBytes,
                            RecordMapper<X> mapper)
      • buildFrom

        public Record buildFrom​(java.nio.ByteBuffer bb,
                                int idx)
      • hasValue

        public boolean hasValue()
      • recordLength

        public int recordLength()
      • keyLength

        public int keyLength()
      • valueLength

        public int valueLength()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object