|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.commons.state.store.registry.StateStoreRegistryKey
public class StateStoreRegistryKey
The 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.
Nested Class Summary | |
---|---|
static class |
StateStoreRegistryKey.EntryType
The type of data an entry persisted with the state repository holds |
Constructor Summary | |
---|---|
StateStoreRegistryKey()
Creates a new instance |
|
StateStoreRegistryKey(java.lang.String Key,
long StartingDataOffset,
long EndingDataOffset,
long StartingRegistryOffset,
StateStoreRegistryKey.EntryType TypeOfEntry)
Creates a new instance with the provided values |
Method Summary | |
---|---|
void |
Deactivate()
Sets the entry as deactivated |
void |
Decode(java.io.DataInputStream stream)
Decodes a StateStoreRegistryKey as the Encode(java.io.RandomAccessFile)
wrote it in the provided file. |
void |
Encode(java.io.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 |
java.lang.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 |
java.lang.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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateStoreRegistryKey()
public StateStoreRegistryKey(java.lang.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 storedMethod Detail |
---|
public java.lang.Boolean IsActive()
public void Deactivate()
public java.lang.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(java.io.RandomAccessFile stream) throws java.lang.Exception
stream
- the file to write the entry to
java.lang.Exception
- The encoding could not be performedpublic void Decode(java.io.DataInputStream stream) throws java.lang.Exception
StateStoreRegistryKey
as the Encode(java.io.RandomAccessFile)
wrote it in the provided file.
stream
- The file to read the entry from
java.lang.Exception
- The decoding could not be performed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |