public class StreamLogDataStore extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STARTING_ADDRESS_KEY |
static String |
STARTING_ADDRESS_PREFIX |
static IDataStore.KvRecord<Long> |
STARTING_ADDRESS_RECORD |
static String |
TAIL_SEGMENT_KEY |
static IDataStore.KvRecord<Long> |
TAIL_SEGMENT_RECORD |
Constructor and Description |
---|
StreamLogDataStore() |
Modifier and Type | Method and Description |
---|---|
long |
getStartingAddress()
Returns the dataStore starting address.
|
long |
getTailSegment()
Return current cached tail segment or get the segment from the data store if not initialized
|
void |
resetStartingAddress()
Reset starting address
|
void |
resetTailSegment()
Reset tail segment
|
void |
updateStartingAddress(long newStartingAddress)
Update current starting address in the data store
|
void |
updateTailSegment(long newTailSegment)
Update current tail segment in the data store
|
public static final String TAIL_SEGMENT_KEY
public static final String STARTING_ADDRESS_PREFIX
public static final String STARTING_ADDRESS_KEY
public static final IDataStore.KvRecord<Long> TAIL_SEGMENT_RECORD
public static final IDataStore.KvRecord<Long> STARTING_ADDRESS_RECORD
public long getTailSegment()
public void updateTailSegment(long newTailSegment)
newTailSegment
- updated tail segmentpublic long getStartingAddress()
public void updateStartingAddress(long newStartingAddress)
newStartingAddress
- updated starting addresspublic void resetTailSegment()
public void resetStartingAddress()
Copyright © 2019 CorfuDB. All rights reserved.