Package io.datarouter.client.redis.node
Class RedisReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>
java.lang.Object
io.datarouter.storage.node.BaseNode<PK,D,F>
io.datarouter.storage.node.type.physical.base.BasePhysicalNode<PK,D,F>
io.datarouter.client.redis.node.RedisReaderNode<PK,D,F>
- All Implemented Interfaces:
io.datarouter.storage.node.Node<PK,D,F>,io.datarouter.storage.node.op.NodeOps<PK,D>,io.datarouter.storage.node.op.raw.read.MapStorageReader<PK,D>,io.datarouter.storage.node.op.raw.read.TallyStorageReader<PK,D>,io.datarouter.storage.node.type.physical.PhysicalNode<PK,D,F>,java.lang.Comparable<io.datarouter.storage.node.Node<PK,D,F>>
- Direct Known Subclasses:
RedisNode
public class RedisReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>
extends io.datarouter.storage.node.type.physical.base.BasePhysicalNode<PK,D,F>
implements io.datarouter.storage.node.op.raw.read.TallyStorageReader<PK,D>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.storage.node.op.raw.read.MapStorageReader
io.datarouter.storage.node.op.raw.read.MapStorageReader.MapStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>, io.datarouter.storage.node.op.raw.read.MapStorageReader.PhysicalMapStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>Nested classes/interfaces inherited from interface io.datarouter.storage.node.op.raw.read.TallyStorageReader
io.datarouter.storage.node.op.raw.read.TallyStorageReader.PhysicalTallyStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>>, io.datarouter.storage.node.op.raw.read.TallyStorageReader.TallyStorageReaderNode<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>,F extends io.datarouter.model.serialize.fielder.DatabeanFielder<PK,D>> -
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.ExecutorServiceexecutorprotected RedisClientManagerredisClientManager -
Constructor Summary
Constructors Constructor Description RedisReaderNode(io.datarouter.storage.node.NodeParams<PK,D,F> params, RedisClientType redisClientType, RedisClientManager redisClientManager, io.datarouter.storage.client.ClientId clientId, java.util.concurrent.ExecutorService executor) -
Method Summary
Modifier and Type Method Description protected java.lang.StringbuildRedisKey(io.datarouter.model.key.primary.PrimaryKey<?> pk)protected java.util.List<java.lang.String>buildRedisKeys(java.util.Collection<? extends io.datarouter.model.key.primary.PrimaryKey<?>> pks)booleanexists(PK key, io.datarouter.storage.config.Config config)java.util.Optional<java.lang.Long>findTallyCount(java.lang.String key, io.datarouter.storage.config.Config config)Dget(PK key, io.datarouter.storage.config.Config config)protected io.lettuce.core.api.async.RedisAsyncCommands<java.lang.String,java.lang.String>getAsyncClient()java.util.List<PK>getKeys(java.util.Collection<PK> keys, io.datarouter.storage.config.Config config)java.util.List<D>getMulti(java.util.Collection<PK> keys, io.datarouter.storage.config.Config config)java.util.Map<java.lang.String,java.lang.Long>getMultiTallyCount(java.util.Collection<java.lang.String> keys, io.datarouter.storage.config.Config config)Methods inherited from class io.datarouter.storage.node.type.physical.base.BasePhysicalNode
getChildNodes, getClientId, getClientIds, getClientType, getFieldInfo, getName, getPhysicalNodes, getPhysicalNodesForClient, toString, usesClientMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
redisClientManager
-
executor
protected final java.util.concurrent.ExecutorService executor
-
-
Constructor Details
-
RedisReaderNode
public RedisReaderNode(io.datarouter.storage.node.NodeParams<PK,D,F> params, RedisClientType redisClientType, RedisClientManager redisClientManager, io.datarouter.storage.client.ClientId clientId, java.util.concurrent.ExecutorService executor)
-
-
Method Details
-
exists
-
get
-
getMulti
-
getKeys
-
findTallyCount
public java.util.Optional<java.lang.Long> findTallyCount(java.lang.String key, io.datarouter.storage.config.Config config) -
getMultiTallyCount
public java.util.Map<java.lang.String,java.lang.Long> getMultiTallyCount(java.util.Collection<java.lang.String> keys, io.datarouter.storage.config.Config config) -
buildRedisKey
protected java.lang.String buildRedisKey(io.datarouter.model.key.primary.PrimaryKey<?> pk) -
buildRedisKeys
protected java.util.List<java.lang.String> buildRedisKeys(java.util.Collection<? extends io.datarouter.model.key.primary.PrimaryKey<?>> pks) -
getAsyncClient
protected io.lettuce.core.api.async.RedisAsyncCommands<java.lang.String,java.lang.String> getAsyncClient()
-