Class ValueBlockV1

java.lang.Object
io.datarouter.filesystem.snapshot.block.value.ValueBlockV1
All Implemented Interfaces:
Block, ValueBlock

public class ValueBlockV1
extends Object
implements ValueBlock
Simple format using 4-byte ints. Contains 4 parts: 1) numValues: encoded 4 byte int 2) endingSection: - 4 byte ints representing the lastByte of each value relative to the valueSection 3) valueSection: variable bytes for each value 4) checksumSection: 8 byte long
  • Field Details

  • Constructor Details

    • ValueBlockV1

      public ValueBlockV1​(byte[] bytes)
  • Method Details

    • heapSize

      public int heapSize()
      Specified by:
      heapSize in interface Block
    • numValues

      public int numValues()
      Specified by:
      numValues in interface ValueBlock
    • value

      public io.datarouter.bytes.Bytes value​(int index)
      Specified by:
      value in interface ValueBlock
    • values

      public io.datarouter.scanner.Scanner<io.datarouter.bytes.Bytes> values()
      Specified by:
      values in interface ValueBlock