public static class ListPropertyMetaDataStore.ListPropertyMetaData extends Object
List.| Constructor and Description |
|---|
ListPropertyMetaDataStore.ListPropertyMetaData(UUID initialLocalVersion,
UUID initialApprovedVersion)
Initializes an instance with initial values.
|
| Modifier and Type | Method and Description |
|---|---|
UUID |
getApprovedVersion()
The approved version the list currently has.
|
UUID |
getLocalVersion()
The actual local version the list currently has.
|
Queue<ListCommand> |
getUnapprovedCommands()
Local commands that have not been approved by other peers yet.
|
List<ListCommand> |
getUnapprovedCommandsAsList()
|
void |
setApprovedVersion(UUID newVersion)
Sets the approved version for the list.
|
void |
setLocalVersion(UUID newVersion)
Sets the local version for the list.
|
String |
toString() |
public ListPropertyMetaDataStore.ListPropertyMetaData(UUID initialLocalVersion, UUID initialApprovedVersion)
initialLocalVersion - The initial local version of the list.initialApprovedVersion - The initial approved version of the list.public UUID getLocalVersion()
Versions of lists are just random UUIDs. When the state of a list is changed it gets a new random
UUID as version.
The local version is the "to" version of the last locally generated command in the list of unapproved commands. If there are no unapproved local commands, than this version is the same as the approved version of a list.
public void setLocalVersion(UUID newVersion)
newVersion - The new version of the list.getLocalVersion()public UUID getApprovedVersion()
Versions of lists are just random UUIDs. When the state of a list is changed it gets a new random
UUID as version.
The approved version of a list is the "from" version of the oldest locally generated change command that was not send back from other peers yet. It is the "to" version of the newest remotely generated change command if there is no local change that wasn't send back from other peers yet.
public void setApprovedVersion(UUID newVersion)
newVersion - The new approved version the list should have.getApprovedVersion()public Queue<ListCommand> getUnapprovedCommands()
public List<ListCommand> getUnapprovedCommandsAsList()
getUnapprovedCommands()Copyright © 2015 Saxonia Systems AG. All Rights Reserved.