public class StateStoreRegistry extends Object
StateManager| Constructor and Description |
|---|
StateStoreRegistry()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
Contains(String Key)
Checks is the provided key is contained in the in memory structure regardless of whether or not it is
active or not
|
Boolean |
Delete(String Key,
StateStoreInfo info)
Effectivly deletes any
StateStoreRegistryKey entry from the State Store Registry that is
associated with the provided key. |
void |
Deserialize(StateStoreInfo info)
This methdo initializes the in memory data structure from the State Store registry persistency files deserializing
the entries found there.
|
StateStoreRegistryKey |
Get(String Key)
Retrieves the
StateStoreRegistryKey that is associated with the provided key from the
in memory data structure if the key is found in the structure. |
Map<String,StateStoreRegistryKey> |
GetDictionary()
Retrieved the dictionary data structure used to store the
StateStoreRegistryKey entries |
File |
MoveToClean()
In case of deletes and updates in the registry and data file, there will be data kept in the file that
are no longer needed but simply remain increraqsing the size of the repository files.
|
Boolean |
Put(StateStoreRegistryKey Key,
StateStoreInfo info)
Adds a
StateStoreRegistryKey in the internal data structure. |
void |
StoreUpdate(StateStoreInfo info,
StateStoreRegistryKey entry,
boolean update)
This method stores a new record, or updates an existing one in the state store registry repository file.
|
public Map<String,StateStoreRegistryKey> GetDictionary()
StateStoreRegistryKey entriespublic Boolean Put(StateStoreRegistryKey Key, StateStoreInfo info) throws Exception
StateStoreRegistryKey in the internal data structure. If the key as retrieved from
StateStoreRegistryKey.GetKey() already exists, the entry it points to is replaced with the provided
one. Once the StateStoreRegistryKey is inserted in the in memory data structure, it is also persisted
in the State Store Registry file. If the entry already existed, it is simply updated there.Key - The entry to insert or updateinfo - Information conserning the peristency repositoriestrue if the entries key was not present in the dicitonary before this insert,
false otherwiseException - The insert / update could not be updatedpublic Boolean Contains(String Key)
Key - the key to check if it is containedtrue if the key is contained in the in memory data structure, false otherwisepublic StateStoreRegistryKey Get(String Key)
StateStoreRegistryKey that is associated with the provided key from the
in memory data structure if the key is found in the structure.Key - The key to search forpublic Boolean Delete(String Key, StateStoreInfo info) throws Exception
StateStoreRegistryKey entry from the State Store Registry that is
associated with the provided key. The entry is set as inactive using StateStoreRegistryKey.Deactivate()
and the change is reflected in the registry persistency fileKey - THe key to deleteinfo - State Store Registry persistency informationtrue if the update was successful, or false if the key was not foundException - The update could not be performedpublic void Deserialize(StateStoreInfo info) throws Exception
info - The State Store repository persistency filesException - The deserialization could not be performedpublic File MoveToClean() throws Exception
StateStoreInfo points
to as the registry repository file is deleted and replaced with the file that this method returnsException - The clean operation could not be performedpublic void StoreUpdate(StateStoreInfo info, StateStoreRegistryKey entry, boolean update) throws Exception
info - The state store repository persistency filesentry - the entry to persistupdate - Whether or not to update or store as new the provided entryException - the stroe / update could not be performedCopyright © 2018. All Rights Reserved.