public class StateStoreRegistryKey extends Object
StateStoreRegistryKey class holds metadata information for one entry registrered with the State
repository. The metadata kept for each such entry include the key with which the entry is identified, the offset
within the registry file that this metadata entry is persisted, the location of the actual data the key is associated
with in the data file, whether or not the entry is to be considered active or a client has deleted it and the type
of the entry data.| Modifier and Type | Class and Description |
|---|---|
static class |
StateStoreRegistryKey.EntryType
The type of data an entry persisted with the state repository holds
|
| Constructor and Description |
|---|
StateStoreRegistryKey()
Creates a new instance
|
StateStoreRegistryKey(String Key,
long StartingDataOffset,
long EndingDataOffset,
long StartingRegistryOffset,
StateStoreRegistryKey.EntryType TypeOfEntry)
Creates a new instance with the provided values
|
| Modifier and Type | Method and Description |
|---|---|
void |
Deactivate()
Sets the entry as deactivated
|
void |
Decode(DataInputStream stream)
Decodes a
StateStoreRegistryKey as the Encode(java.io.RandomAccessFile)
wrote it in the provided file. |
void |
Encode(RandomAccessFile stream)
Stores this instance in the provided file leaving the file pointer at the end of the written entry.
|
long |
GetEndingDataOffset()
Retrieves the ending offset in the data fale where the entry's data are stored
|
String |
GetKey()
Retrieves the key with which the entry is identified
|
long |
GetStartingDataOffset()
Retrieves the offset in the data falie where the entry's data are stored
|
long |
GetStartingRegistryOffset()
Retrieves the offset in the registry file where this metadata entry is stored
|
StateStoreRegistryKey.EntryType |
GetTypeOfEntry()
Retrieves the type of entry
|
Boolean |
IsActive()
Whether or not the entry is considered active or it has been deleted
|
void |
SetEndingDataOffset(long Offset)
Sets the ending offset in the data fale where the entry's data are stored
|
void |
SetStartingDataOffset(long Offset)
Sets the offset in the data falie where the entry's data are stored
|
void |
SetStartingRegistryOffset(long Offset)
Sets the offset in the registry file where this metadata entry is stored
|
public StateStoreRegistryKey()
public StateStoreRegistryKey(String Key, long StartingDataOffset, long EndingDataOffset, long StartingRegistryOffset, StateStoreRegistryKey.EntryType TypeOfEntry)
Key - The key with which this entry is reachableStartingDataOffset - The starting offset of the actual data in the data fileEndingDataOffset - The ending offset of the actual data in the data fileStartingRegistryOffset - The starting offset of this metadata record in the registry fileTypeOfEntry - The type of the actual data storedpublic Boolean IsActive()
public void Deactivate()
public String GetKey()
public StateStoreRegistryKey.EntryType GetTypeOfEntry()
public long GetStartingRegistryOffset()
public void SetStartingRegistryOffset(long Offset)
Offset - the offsetpublic long GetStartingDataOffset()
public void SetStartingDataOffset(long Offset)
Offset - the offsetpublic long GetEndingDataOffset()
public void SetEndingDataOffset(long Offset)
Offset - the offsetpublic void Encode(RandomAccessFile stream) throws Exception
stream - the file to write the entry toException - The encoding could not be performedpublic void Decode(DataInputStream stream) throws Exception
StateStoreRegistryKey as the Encode(java.io.RandomAccessFile)
wrote it in the provided file.stream - The file to read the entry fromException - The decoding could not be performedCopyright © 2018. All Rights Reserved.