Modifier | Constructor and Description |
---|---|
protected |
Segment() |
|
Segment(java.nio.file.Path segmentPath,
Range segmentRange,
Rollupable rollupable,
FileManager fileManager,
java.util.List<java.lang.Long> rollupLevels) |
Modifier and Type | Method and Description |
---|---|
void |
applyChanges(java.util.LinkedList<IndividualChange<T>> changeQueueForSegment) |
java.util.List<Range> |
calculatePossibleChunkRanges(long groupingNumber) |
int |
compareTo(Segment<T> other) |
boolean |
contains(BlueKey key) |
void |
delete(BlueKey key) |
static java.util.List<Range> |
determineRangesRequiringRollup(java.util.List<Range> existingChunkRanges,
long minimumChunkSize) |
boolean |
equals(java.lang.Object obj) |
protected java.util.List<java.io.File> |
filterAndDeleteEmptyFiles(java.util.List<java.io.File> orderedFiles) |
T |
get(BlueKey key) |
protected static <T extends java.io.Serializable> |
get(BlueKey key,
BlueObjectInput<BlueEntity<T>> inputStream) |
static java.util.List<Range> |
getAllFileRangesInOrder(java.nio.file.Path segmentPath) |
SegmentEntityIterator<T> |
getIterator(long min,
long max) |
SegmentEntityIterator<T> |
getIterator(long highestGroupingNumberCompleted,
long rangeMin,
long rangeMax) |
SegmentEntityIterator<T> |
getIterator(long highestGroupingNumberCompleted,
Range range) |
long |
getMinimumRollupSizeBeforeBatch() |
protected BlueObjectInput<BlueEntity<T>> |
getObjectInputFor(long groupingNumber) |
protected BlueObjectInput<BlueEntity<T>> |
getObjectInputFor(java.nio.file.Path path) |
protected BlueObjectOutput<BlueEntity<T>> |
getObjectOutputFor(java.nio.file.Path path) |
java.util.List<java.io.File> |
getOrderedFilesEnclosedInRange(Range range) |
java.util.List<java.io.File> |
getOrderedFilesInRange(Range range) |
java.nio.file.Path |
getPath() |
Range |
getRange() |
BlueReadLock<java.nio.file.Path> |
getReadLockFor(long groupingNumber) |
protected java.util.List<Range> |
getRollupRanges(Range currentChunkRange) |
protected java.util.List<RollupTarget> |
getRollupTargets(Range currentChunkRange) |
protected static <T extends java.io.Serializable> |
getTestSegment() |
int |
hashCode() |
void |
insert(BlueKey newKey,
T newValue) |
boolean |
isValidRollupRange(Range timeRange) |
void |
modifyChunk(long groupingNumber,
StreamingWriter<T> processor) |
void |
modifyChunk(java.nio.file.Path targetPath,
StreamingWriter<T> processor) |
protected void |
reportRead(java.nio.file.Path path) |
protected void |
reportWrite(java.nio.file.Path path) |
void |
rollup(Range timeRange) |
protected RollupTarget |
toRollupTarget(Range range) |
java.lang.String |
toString() |
void |
update(BlueKey newKey,
T newValue) |
public Segment(java.nio.file.Path segmentPath, Range segmentRange, Rollupable rollupable, FileManager fileManager, java.util.List<java.lang.Long> rollupLevels)
protected Segment()
protected static <T extends java.io.Serializable> Segment<T> getTestSegment()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean contains(BlueKey key) throws BlueDbException
BlueDbException
public void update(BlueKey newKey, T newValue) throws BlueDbException
BlueDbException
public void insert(BlueKey newKey, T newValue) throws BlueDbException
BlueDbException
public void delete(BlueKey key) throws BlueDbException
BlueDbException
public void modifyChunk(long groupingNumber, StreamingWriter<T> processor) throws BlueDbException
BlueDbException
public T get(BlueKey key) throws BlueDbException
BlueDbException
public Range getRange()
public SegmentEntityIterator<T> getIterator(long highestGroupingNumberCompleted, Range range)
public SegmentEntityIterator<T> getIterator(long highestGroupingNumberCompleted, long rangeMin, long rangeMax)
public SegmentEntityIterator<T> getIterator(long min, long max)
public void applyChanges(java.util.LinkedList<IndividualChange<T>> changeQueueForSegment) throws BlueDbException
BlueDbException
public long getMinimumRollupSizeBeforeBatch()
public static java.util.List<Range> determineRangesRequiringRollup(java.util.List<Range> existingChunkRanges, long minimumChunkSize)
public void modifyChunk(java.nio.file.Path targetPath, StreamingWriter<T> processor) throws BlueDbException
BlueDbException
public void rollup(Range timeRange) throws BlueDbException
BlueDbException
protected java.util.List<java.io.File> filterAndDeleteEmptyFiles(java.util.List<java.io.File> orderedFiles)
public boolean isValidRollupRange(Range timeRange)
public static java.util.List<Range> getAllFileRangesInOrder(java.nio.file.Path segmentPath)
public java.util.List<java.io.File> getOrderedFilesEnclosedInRange(Range range)
public java.util.List<java.io.File> getOrderedFilesInRange(Range range)
protected BlueObjectOutput<BlueEntity<T>> getObjectOutputFor(java.nio.file.Path path) throws BlueDbException
BlueDbException
protected BlueObjectInput<BlueEntity<T>> getObjectInputFor(java.nio.file.Path path) throws BlueDbException
BlueDbException
protected BlueObjectInput<BlueEntity<T>> getObjectInputFor(long groupingNumber) throws BlueDbException
BlueDbException
public BlueReadLock<java.nio.file.Path> getReadLockFor(long groupingNumber) throws BlueDbException
BlueDbException
public java.nio.file.Path getPath()
protected void reportWrite(java.nio.file.Path path)
protected void reportRead(java.nio.file.Path path)
protected java.util.List<RollupTarget> getRollupTargets(Range currentChunkRange)
protected RollupTarget toRollupTarget(Range range)
public java.util.List<Range> calculatePossibleChunkRanges(long groupingNumber)
protected static <T extends java.io.Serializable> T get(BlueKey key, BlueObjectInput<BlueEntity<T>> inputStream)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object