Class KeyValueStoreWrapper<T>
- java.lang.Object
-
- org.opennms.features.apilayer.common.distributed.KeyValueStoreWrapper<T>
-
- All Implemented Interfaces:
org.opennms.integration.api.v1.distributed.KeyValueStore<T>
public class KeyValueStoreWrapper<T> extends Object implements org.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
-
Constructor Summary
Constructors Constructor Description KeyValueStoreWrapper(KeyValueStore store)
-
Method Summary
-
-
-
Constructor Detail
-
KeyValueStoreWrapper
public KeyValueStoreWrapper(KeyValueStore store)
-
-
Method Detail
-
put
public long put(String key, T value, String context)
- Specified by:
put
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
put
public long put(String key, T value, String context, Integer ttlInSeconds)
- Specified by:
put
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
get
public Optional<T> get(String key, String context)
- Specified by:
get
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getIfStale
public Optional<T> getIfStale(String key, String context, long timestamp)
- Specified by:
getIfStale
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getLastUpdated
public OptionalLong getLastUpdated(String key, String context)
- Specified by:
getLastUpdated
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
enumerateContext
public Map<String,T> enumerateContext(String context)
- Specified by:
enumerateContext
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
delete
public void delete(String key, String context)
- Specified by:
delete
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
truncateContext
public void truncateContext(String context)
- Specified by:
truncateContext
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
putAsync
public CompletableFuture<Long> putAsync(String key, T value, String context)
- Specified by:
putAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
putAsync
public CompletableFuture<Long> putAsync(String key, T value, String context, Integer ttlInSeconds)
- Specified by:
putAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getAsync
public CompletableFuture<Optional<T>> getAsync(String key, String context)
- Specified by:
getAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getIfStaleAsync
public CompletableFuture<Optional<T>> getIfStaleAsync(String key, String context, long timestamp)
- Specified by:
getIfStaleAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getLastUpdatedAsync
public CompletableFuture<OptionalLong> getLastUpdatedAsync(String key, String context)
- Specified by:
getLastUpdatedAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
enumerateContextAsync
public CompletableFuture<Map<String,T>> enumerateContextAsync(String context)
- Specified by:
enumerateContextAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
deleteAsync
public CompletableFuture<Void> deleteAsync(String key, String context)
- Specified by:
deleteAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
truncateContextAsync
public CompletableFuture<Void> truncateContextAsync(String context)
- Specified by:
truncateContextAsync
in interfaceorg.opennms.integration.api.v1.distributed.KeyValueStore<T>
-
-