public class MemoryStore extends Object implements SegmentStore
| Constructor and Description |
|---|
MemoryStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsSegment(SegmentId id)
Checks whether the identified segment exists in this store.
|
void |
gc() |
org.apache.jackrabbit.oak.spi.blob.BlobStore |
getBlobStore() |
SegmentReader |
getReader() |
Revisions |
getRevisions() |
SegmentTracker |
getTracker() |
SegmentWriter |
getWriter() |
SegmentId |
newBulkSegmentId()
Create a new
SegmentId for a segment of type "bulk". |
SegmentId |
newDataSegmentId()
Create a new
SegmentId for a segment of type "data". |
SegmentId |
newSegmentId(long msb,
long lsb)
Create a
SegmentId represented by the given MSB/LSB pair. |
Segment |
readSegment(SegmentId id)
Reads the identified segment from this store.
|
void |
writeSegment(SegmentId id,
byte[] data,
int offset,
int length)
Writes the given segment to the segment store.
|
public MemoryStore()
throws IOException
IOException@Nonnull public SegmentTracker getTracker()
@Nonnull public SegmentWriter getWriter()
@Nonnull public SegmentReader getReader()
public boolean containsSegment(SegmentId id)
SegmentStorecontainsSegment in interface SegmentStoreid - segment identifiertrue if the segment exists, false otherwise@Nonnull public Segment readSegment(SegmentId id)
SegmentStorereadSegment in interface SegmentStoreid - segment identifierSegmentNotFoundException thrown if not found@Nonnull public SegmentId newSegmentId(long msb, long lsb)
SegmentStoreSegmentId represented by the given MSB/LSB pair.newSegmentId in interface SegmentStoremsb - The most significant bits of the SegmentId.lsb - The least significant bits of the SegmentId.null instance of SegmentId.@Nonnull public SegmentId newBulkSegmentId()
SegmentStoreSegmentId for a segment of type "bulk".newBulkSegmentId in interface SegmentStorenull instance of SegmentId.@Nonnull public SegmentId newDataSegmentId()
SegmentStoreSegmentId for a segment of type "data".newDataSegmentId in interface SegmentStorenull instance of SegmentId.public void writeSegment(SegmentId id, byte[] data, int offset, int length) throws IOException
SegmentStorewriteSegment in interface SegmentStoreid - segment identifierdata - byte buffer that contains the raw contents of the segmentoffset - start offset within the byte bufferlength - length of the segmentIOException@CheckForNull public org.apache.jackrabbit.oak.spi.blob.BlobStore getBlobStore()
nullpublic void gc()
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.