Package me.ahoo.cosid.store.redis
Class RedisStoreProvider
java.lang.Object
me.ahoo.cosid.store.redis.RedisStoreProvider
- All Implemented Interfaces:
me.ahoo.cosid.store.StoreProvider
Opens
RedisStores, type redis (06-stores.md ยง2.2); registered with ServiceLoader.
StoreConfig.client() may hold:
- a
RedisScripts: used as it is,WAITincluded (the Spring Data adapter); - a
RedisClientorRedisClusterClient: the store opens a connection of its own on it and closes that connection, not the client; - a
StatefulRedisConnection<String, String>orStatefulRedisClusterConnection<String, String>: used for the scripts, and never closed. SinceWAITmust not block a shared connection, this needswaitresolving to 0; - nothing: the store creates a client from
options.uriand closes it.
Options: uri (a Redis URI, without a client), cluster (true for a Redis Cluster
uri), wait (auto, the default: WAIT 1 after each write when the server has replicas;
off; or the replica count) and sweepBatch (expired leases one acquire sweeps, default
16). StoreConfig.timeout() bounds each command and WAIT.
The uniqueness of the ids rests on acknowledged writes never being lost: see RedisStore.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TYPE
The store type.- See Also:
-
-
Constructor Details
-
RedisStoreProvider
public RedisStoreProvider()
-
-
Method Details
-
type
- Specified by:
typein interfaceme.ahoo.cosid.store.StoreProvider
-
options
- Specified by:
optionsin interfaceme.ahoo.cosid.store.StoreProvider
-
open
public me.ahoo.cosid.store.Store open(me.ahoo.cosid.store.StoreConfig config) - Specified by:
openin interfaceme.ahoo.cosid.store.StoreProvider
-