Package org.jgrapes.util.events
Class KeyValueStoreUpdate
- All Implemented Interfaces:
Future<Void>,Associator,Eligible
An event that triggers updates or deletions in a key/value store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe base class for all actions.static classA key (and value) deletion.static classA value update.Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Field Summary
Fields inherited from class org.jgrapes.core.internal.EventBase
completed, completionEvents, invokedFor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the actions.Adds a new deletion action that clears all keys with the given path prefix.Adds a new deletion action to the event.Adds a new update action to the event that stores the given value on the path formed by the path segments.Adds a new update action to the event.Methods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toStringMethods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGetMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
KeyValueStoreUpdate
public KeyValueStoreUpdate()
-
-
Method Details
-
update
Adds a new update action to the event.- Parameters:
key- the keyvalue- the value- Returns:
- the event for easy chaining
-
storeAs
Adds a new update action to the event that stores the given value on the path formed by the path segments.- Parameters:
value- the valuesegments- the path segments- Returns:
- the event for easy chaining
-
delete
Adds a new deletion action to the event.- Parameters:
key- the key- Returns:
- the event for easy chaining
-
clearAll
Adds a new deletion action that clears all keys with the given path prefix.- Parameters:
segments- the path segments- Returns:
- the event for easy chaining
-
actions
Returns the actions.- Returns:
- the actions
-