Class MemoryStore

  • All Implemented Interfaces:
    SegmentStore

    public class MemoryStore
    extends java.lang.Object
    implements SegmentStore
    A store used for in-memory operations.
    • Constructor Detail

      • MemoryStore

        public MemoryStore()
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getSegmentIdProvider

        @NotNull
        public @NotNull SegmentIdProvider getSegmentIdProvider()
      • getRevisions

        @NotNull
        public @NotNull Revisions getRevisions()
      • containsSegment

        public boolean containsSegment​(SegmentId id)
        Description copied from interface: SegmentStore
        Checks whether the identified segment exists in this store.
        Specified by:
        containsSegment in interface SegmentStore
        Parameters:
        id - segment identifier
        Returns:
        true if the segment exists, false otherwise
      • writeSegment

        public void writeSegment​(SegmentId id,
                                 byte[] data,
                                 int offset,
                                 int length)
                          throws java.io.IOException
        Description copied from interface: SegmentStore
        Writes the given segment to the segment store.
        Specified by:
        writeSegment in interface SegmentStore
        Parameters:
        id - segment identifier
        data - byte buffer that contains the raw contents of the segment
        offset - start offset within the byte buffer
        length - length of the segment
        Throws:
        java.io.IOException
      • getBlobStore

        @Nullable
        public @Nullable BlobStore getBlobStore()
        Returns:
        null
      • gc

        public void gc()
      • getReferencedSegmentIds

        public java.util.Set<SegmentId> getReferencedSegmentIds()