Class AbstractKeyValueStore<T>

    • Constructor Detail

      • AbstractKeyValueStore

        public AbstractKeyValueStore()
    • Method Detail

      • put

        public final long put​(String key,
                              T value,
                              String context)
        Specified by:
        put in interface KeyValueStore<T>
        context - a context used to differentiate between keys with the same name (forms a compound key)
        Returns:
        the timestamp the value was persisted with
      • putAsync

        public final CompletableFuture<Long> putAsync​(String key,
                                                      T value,
                                                      String context)
        Specified by:
        putAsync in interface KeyValueStore<T>
        context - a context used to differentiate between keys with the same name (forms a compound key)
        Returns:
        a future containing the timestamp the value was persisted with
      • truncateContext

        public void truncateContext​(String context)
        A default truncate implementation.
        Specified by:
        truncateContext in interface KeyValueStore<T>
        Parameters:
        context - a context used to differentiate between keys with the same name (forms a compound key)