public interface SegmentStore
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
containsSegment(SegmentId id)
Checks whether the identified segment exists in this store.
|
void |
gc()
Triggers removal of segments that are no longer referenceable.
|
BlobStore |
getBlobStore()
Returns the external BlobStore (if configured) with this store
|
SegmentNodeState |
getHead()
Returns the head state.
|
SegmentTracker |
getTracker() |
Blob |
readBlob(String reference)
Read a blob from external storage.
|
Segment |
readSegment(SegmentId segmentId)
Reads the identified segment from this store.
|
boolean |
setHead(SegmentNodeState base,
SegmentNodeState head) |
void |
writeSegment(SegmentId id,
byte[] bytes,
int offset,
int length)
Writes the given segment to the segment store.
|
SegmentTracker getTracker()
SegmentNodeState getHead()
boolean setHead(SegmentNodeState base, SegmentNodeState head)
boolean containsSegment(SegmentId id)
id
- segment identifiertrue
if the segment exists, false
otherwiseSegment readSegment(SegmentId segmentId)
segmentId
- segment identifierSegmentNotFoundException
thrown if not foundvoid writeSegment(SegmentId id, byte[] bytes, int offset, int length)
id
- segment identifierbytes
- byte buffer that contains the raw contents of the segmentoffset
- start offset within the byte bufferlength
- length of the segmentvoid close()
Blob readBlob(String reference)
reference
- blob referenceBlobStore getBlobStore()
void gc()
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"