Interface TransientDataStore

All Known Subinterfaces:
TransientDataStoreProvider
All Known Implementing Classes:
AbstractTransientDataStoreProvider, KeyValueTransientDataStore, MemTransientDataStore, MongoDBTransientDataStore

public interface TransientDataStore
This is the interface for a Transient Data store, which stores dictionary values associated to keys on which the TTL applies.

A Transient Data store is thread-safe.

Since:
2025.8
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    exists(@NotNull String key)
    Returns true if an entry exists with the given key.
    <S extends Serializable>
    S
    get(@NotNull String key, @NotNull String parameter)
    Gets the value of parameter in the entry with the given key.
    <S extends Serializable>
    Map<String,S>
    getAll(@NotNull String key)
    Gets values of the parameters in the entry with the given key.
    <S extends Serializable>
    void
    put(@NotNull String key, @NotNull String parameter, S value)
    Puts parameter to value in the entry with the given key.
    <S extends Serializable>
    void
    putAll(@NotNull String key, @NotNull Map<String,S> parameters)
    Puts parameters in the entry with the given key.
    <S extends Serializable>
    S
    remove(@NotNull String key, @NotNull String parameter)
    Removes the value of parameter in the entry with the given key and returns it.
    <S extends Serializable>
    Map<String,S>
    removeAll(@NotNull String key)
    Removes values of parameters in the entry with the given key and returns them.
  • Method Details

    • put

      <S extends Serializable> void put(@NotNull @NotNull String key, @NotNull @NotNull String parameter, @NotNull S value)
      Puts parameter to value in the entry with the given key.

      If entry does not exist, a new entry is created. If parameter already exists in the entry, it is overwritten.

    • putAll

      <S extends Serializable> void putAll(@NotNull @NotNull String key, @NotNull @NotNull Map<String,S> parameters)
      Puts parameters in the entry with the given key. Overwrites any existing parameter in the entry.

      If entry does not exist, a new entry is created.

      API Note:
      an empty Map is considered as a null parameter, and so rejected
    • exists

      boolean exists(@NotNull @NotNull String key)
      Returns true if an entry exists with the given key.
    • get

      <S extends Serializable> S get(@NotNull @NotNull String key, @NotNull @NotNull String parameter)
      Gets the value of parameter in the entry with the given key.

      Returns null if entry or parameter does not exist.

    • getAll

      <S extends Serializable> Map<String,S> getAll(@NotNull @NotNull String key)
      Gets values of the parameters in the entry with the given key.

      Returns null if entry does not exist.

    • remove

      <S extends Serializable> S remove(@NotNull @NotNull String key, @NotNull @NotNull String parameter)
      Removes the value of parameter in the entry with the given key and returns it.

      Returns null if entry or parameter does not exist.

    • removeAll

      <S extends Serializable> Map<String,S> removeAll(@NotNull @NotNull String key)
      Removes values of parameters in the entry with the given key and returns them.

      Returns null if entry does not exist.