public interface VirtualNetworkIntentStore extends VirtualStore<IntentEvent,IntentStoreDelegate>
Modifier and Type | Method and Description |
---|---|
void |
addPending(NetworkId networkId,
IntentData intent)
Adds a new operation, which should be persisted and delegated.
|
void |
batchWrite(NetworkId networkId,
Iterable<IntentData> updates)
Writes a batch of IntentData objects to the store.
|
List<Intent> |
getInstallableIntents(NetworkId networkId,
Key intentKey)
Returns the list of the installable events associated with the specified
original intent.
|
Intent |
getIntent(NetworkId networkId,
Key key)
Returns the intent with the specified identifier.
|
long |
getIntentCount(NetworkId networkId)
Returns the number of intents in the store.
|
Iterable<IntentData> |
getIntentData(NetworkId networkId,
boolean localOnly,
long olderThan)
Returns an iterable of all intent data objects in the store.
|
IntentData |
getIntentData(NetworkId networkId,
Key key)
Returns the intent data object associated with the specified key.
|
Iterable<Intent> |
getIntents(NetworkId networkId)
Returns an iterable of all intents in the store.
|
IntentState |
getIntentState(NetworkId networkId,
Key intentKey)
Returns the state of the specified intent.
|
Iterable<Intent> |
getPending(NetworkId networkId)
Returns the intent requests pending processing.
|
Iterable<IntentData> |
getPendingData(NetworkId networkId)
Returns the intent data objects that are pending processing.
|
Iterable<IntentData> |
getPendingData(NetworkId networkId,
boolean localOnly,
long olderThan)
Returns the intent data objects that are pending processing for longer
than the specified duration.
|
IntentData |
getPendingData(NetworkId networkId,
Key intentKey)
Returns the intent data object that are pending processing for a specfied
key.
|
boolean |
isMaster(NetworkId networkId,
Key intentKey)
Checks to see whether the calling instance is the master for processing
this intent, or more specifically, the key contained in this intent.
|
void |
write(NetworkId networkId,
IntentData newData)
Writes an IntentData object to the store.
|
hasDelegate, setDelegate, unsetDelegate
long getIntentCount(NetworkId networkId)
networkId
- the virtual network identifierIterable<Intent> getIntents(NetworkId networkId)
networkId
- the virtual network identifierIterable<IntentData> getIntentData(NetworkId networkId, boolean localOnly, long olderThan)
networkId
- the virtual network identifierlocalOnly
- should only intents for which this instance is master
be returnedolderThan
- specified duration in milliseconds (0 for "now")IntentState getIntentState(NetworkId networkId, Key intentKey)
networkId
- the virtual network identifierintentKey
- intent identificationList<Intent> getInstallableIntents(NetworkId networkId, Key intentKey)
networkId
- the virtual network identifierintentKey
- original intent identifiervoid write(NetworkId networkId, IntentData newData)
networkId
- the virtual network identifiernewData
- new intent data to writevoid batchWrite(NetworkId networkId, Iterable<IntentData> updates)
networkId
- the virtual network identifierupdates
- collection of intent data objects to writeIntent getIntent(NetworkId networkId, Key key)
networkId
- the virtual network identifierkey
- keyIntentData getIntentData(NetworkId networkId, Key key)
networkId
- the virtual network identifierkey
- key to look upvoid addPending(NetworkId networkId, IntentData intent)
networkId
- the virtual network identifierintent
- operationboolean isMaster(NetworkId networkId, Key intentKey)
networkId
- the virtual network identifierintentKey
- intentKey to checkIterable<Intent> getPending(NetworkId networkId)
networkId
- the virtual network identifierIterable<IntentData> getPendingData(NetworkId networkId)
networkId
- the virtual network identifierIntentData getPendingData(NetworkId networkId, Key intentKey)
networkId
- the virtual network identifierintentKey
- key to look upIterable<IntentData> getPendingData(NetworkId networkId, boolean localOnly, long olderThan)
networkId
- the virtual network identifierlocalOnly
- should only intents for which this instance is master
be returnedolderThan
- specified duration in milliseconds (0 for "now")