Class KeyValueStoreUpdate

java.lang.Object
org.jgrapes.core.internal.EventBase<T>
org.jgrapes.core.Event<Void>
org.jgrapes.util.events.KeyValueStoreUpdate
All Implemented Interfaces:
Future<Void>, Associator, Eligible

public class KeyValueStoreUpdate extends Event<Void>
An event that triggers updates or deletions in a key/value store.
  • Constructor Details

  • Method Details

    • update

      public KeyValueStoreUpdate update(String key, String value)
      Adds a new update action to the event.
      Parameters:
      key - the key
      value - the value
      Returns:
      the event for easy chaining
    • storeAs

      public KeyValueStoreUpdate storeAs(String value, String... segments)
      Adds a new update action to the event that stores the given value on the path formed by the path segments.
      Parameters:
      value - the value
      segments - 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

      public KeyValueStoreUpdate clearAll(String... segments)
      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