public abstract class AbstractStreamContext extends Object implements Comparable<AbstractStreamContext>
Modifier and Type | Field and Description |
---|---|
protected long |
gcTrimMark
The trim mark for Garbage Collection.
|
protected long |
globalPointer
A pointer to the current global address, which is the
global address of the most recently added entry.
|
Constructor and Description |
---|
AbstractStreamContext(UUID id,
long maxGlobalAddress)
Generate a new stream context given the id of the stream and the
maximum address to read to.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AbstractStreamContext o) |
protected void |
setGlobalPointer(long globalPointer) |
protected void |
setGlobalPointerCheckGCTrimMark(long globalPointer)
Set Global Pointer and validate its position does not fall in the GC trim range.
|
protected void |
validateGlobalPointerPosition(long globalPointer)
Validate that Global Pointer position does not fall in the GC trim range.
|
protected long gcTrimMark
protected long globalPointer
public AbstractStreamContext(UUID id, long maxGlobalAddress)
id
- The id of the stream.maxGlobalAddress
- The maximum address to read up to.protected void setGlobalPointerCheckGCTrimMark(long globalPointer)
globalPointer
- position to set the global pointer to.protected void setGlobalPointer(long globalPointer)
protected void validateGlobalPointerPosition(long globalPointer)
globalPointer
- position to set the global pointer to.public int compareTo(AbstractStreamContext o)
compareTo
in interface Comparable<AbstractStreamContext>
Copyright © 2019 CorfuDB. All rights reserved.