public class ListPropertyMetaDataStore extends Object
Lists needed to keep them synchronous with other peers.
Weakly means, that when the garbage collector decides to collect a list properties its version assignment in this class may be collected as well.
| Modifier and Type | Class and Description |
|---|---|
static class |
ListPropertyMetaDataStore.ListPropertyMetaData
The meta data about a
List. |
| Constructor and Description |
|---|
ListPropertyMetaDataStore(WeakObjectRegistry objectRegistry)
Creates a new instance with all its dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
ListPropertyMetaDataStore.ListPropertyMetaData |
getMetaDataOrFail(List<?> list)
Returns the meta data for a given
List. |
ListPropertyMetaDataStore.ListPropertyMetaData |
getMetaDataOrFail(UUID listId)
Returns the meta data for a
List with a given id. |
boolean |
hasMetaDataFor(List<?> list)
Checks if this meta data store does already have meta data for a given list.
|
void |
storeMetaDataOrFail(List<?> list,
ListPropertyMetaDataStore.ListPropertyMetaData metaData)
Stores meta data for a new
List. |
public ListPropertyMetaDataStore(WeakObjectRegistry objectRegistry)
objectRegistry - Used to retrieve list by their id.public ListPropertyMetaDataStore.ListPropertyMetaData getMetaDataOrFail(List<?> list)
List.list - The list thats meta data should be returned.public ListPropertyMetaDataStore.ListPropertyMetaData getMetaDataOrFail(UUID listId) throws ObjectToIdMappingException
List with a given id.
Performance hint: If a reference to the list property itself is available, the method
getMetaDataOrFail(List) should be used as this saves a lookup in a map.
listId - The id of the Listt thats meta data should be returned.Listt if known.ObjectToIdMappingException - When no meta data for the list with the passed id is known.public void storeMetaDataOrFail(List<?> list, ListPropertyMetaDataStore.ListPropertyMetaData metaData) throws ObjectToIdMappingException
List.list - The list that meta data should be stored for.metaData - The initial meta data for the new List.ObjectToIdMappingException - If the list isn't. That means that there is already meta data stored for a List with
listIdpublic boolean hasMetaDataFor(List<?> list)
list - The list that should be checked for already having meta data.true if meta data is known and false if not.Copyright © 2016 Saxonia Systems AG. All Rights Reserved.