@Beta public interface IntentStore extends Store<IntentEvent,IntentStoreDelegate>
Modifier and Type | Method and Description |
---|---|
void |
addPending(IntentData intent)
Adds a new operation, which should be persisted and delegated.
|
void |
batchWrite(java.lang.Iterable<IntentData> updates)
Writes a batch of IntentData objects to the store.
|
java.util.List<Intent> |
getInstallableIntents(Key intentKey)
Returns the list of the installable events associated with the specified
original intent.
|
Intent |
getIntent(Key key)
Returns the intent with the specified identifier.
|
long |
getIntentCount()
Returns the number of intents in the store.
|
java.lang.Iterable<IntentData> |
getIntentData(boolean localOnly,
long olderThan)
Returns an iterable of all intent data objects in the store.
|
IntentData |
getIntentData(Key key)
Returns the intent data object associated with the specified key.
|
java.lang.Iterable<Intent> |
getIntents()
Returns an iterable of all intents in the store.
|
IntentState |
getIntentState(Key intentKey)
Returns the state of the specified intent.
|
java.lang.Iterable<Intent> |
getPending()
Returns the intent requests pending processing.
|
java.lang.Iterable<IntentData> |
getPendingData()
Returns the intent data objects that are pending processing.
|
java.lang.Iterable<IntentData> |
getPendingData(boolean localOnly,
long olderThan)
Returns the intent data objects that are pending processing for longer
than the specified duration.
|
IntentData |
getPendingData(Key intentKey)
Returns the intent data object that are pending processing for a specfied
key.
|
boolean |
isMaster(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(IntentData newData)
Writes an IntentData object to the store.
|
hasDelegate, setDelegate, unsetDelegate
long getIntentCount()
java.lang.Iterable<Intent> getIntents()
java.lang.Iterable<IntentData> getIntentData(boolean localOnly, long olderThan)
localOnly
- should only intents for which this instance is master
be returnedolderThan
- specified duration in milliseconds (0 for "now")IntentState getIntentState(Key intentKey)
intentKey
- intent identificationjava.util.List<Intent> getInstallableIntents(Key intentKey)
intentKey
- original intent identifiervoid write(IntentData newData)
newData
- new intent data to writevoid batchWrite(java.lang.Iterable<IntentData> updates)
updates
- collection of intent data objects to writeIntent getIntent(Key key)
key
- keyIntentData getIntentData(Key key)
key
- key to look upvoid addPending(IntentData intent)
intent
- operationboolean isMaster(Key intentKey)
intentKey
- intentKey to checkjava.lang.Iterable<Intent> getPending()
java.lang.Iterable<IntentData> getPendingData()
IntentData getPendingData(Key intentKey)
intentKey
- key to look upjava.lang.Iterable<IntentData> getPendingData(boolean localOnly, long olderThan)
localOnly
- should only intents for which this instance is master
be returnedolderThan
- specified duration in milliseconds (0 for "now")