@Override public RedisClusterNode clusterGetNodeForKey(byte[] key) { int slot = executorService.getConnectionManager().calcSlot(key); return clusterGetNodeForSlot(slot); }
@Override public RedisClusterNode clusterGetNodeForKey(byte[] key) { int slot = executorService.getConnectionManager().calcSlot(key); return clusterGetNodeForSlot(slot); }
@Override public RedisClusterNode clusterGetNodeForKey(byte[] key) { int slot = executorService.getConnectionManager().calcSlot(key); return clusterGetNodeForSlot(slot); }
protected boolean isEvalCacheActive() { return getConnectionManager().getCfg().isUseScriptCache(); }
protected boolean isEvalCacheActive() { return getConnectionManager().getCfg().isUseScriptCache(); }
protected MasterSlaveEntry getEntry(RedisClusterNode node) { MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); return entry; }
protected MasterSlaveEntry getEntry(RedisClusterNode node) { MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); return entry; }
protected MasterSlaveEntry getEntry(RedisClusterNode node) { MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); return entry; }
private RFuture<Long> executeAsync(RedisStrictCommand<Long> command, byte[] ... keys) { if (!executorService.getConnectionManager().isClusterMode()) { return executorService.writeAsync(null, command, Arrays.asList(keys).toArray()); int slot = executorService.getConnectionManager().calcSlot(key); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(slot); List<byte[]> list = range2key.get(entry); if (list == null) { CommandBatchService es = new CommandBatchService(executorService.getConnectionManager()); for (byte[] key : entry.getValue()) { es.writeAsync(entry.getKey(), null, command, key);
private RFuture<Long> executeAsync(RedisStrictCommand<Long> command, byte[] ... keys) { if (!executorService.getConnectionManager().isClusterMode()) { return executorService.writeAsync(null, command, Arrays.asList(keys).toArray()); int slot = executorService.getConnectionManager().calcSlot(key); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(slot); List<byte[]> list = range2key.get(entry); if (list == null) { CommandBatchService es = new CommandBatchService(executorService.getConnectionManager()); for (byte[] key : entry.getValue()) { es.writeAsync(entry.getKey(), null, command, key);
private RFuture<Long> executeAsync(RedisStrictCommand<Long> command, byte[] ... keys) { if (!executorService.getConnectionManager().isClusterMode()) { return executorService.writeAsync(null, command, Arrays.asList(keys).toArray()); int slot = executorService.getConnectionManager().calcSlot(key); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(slot); List<byte[]> list = range2key.get(entry); if (list == null) { CommandBatchService es = new CommandBatchService(executorService.getConnectionManager()); for (byte[] key : entry.getValue()) { es.writeAsync(entry.getKey(), null, command, key);
private RFuture<Long> executeAsync(RedisStrictCommand<Long> command, byte[] ... keys) { if (!executorService.getConnectionManager().isClusterMode()) { return executorService.writeAsync(null, command, Arrays.asList(keys).toArray()); int slot = executorService.getConnectionManager().calcSlot(key); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(slot); List<byte[]> list = range2key.get(entry); if (list == null) { CommandBatchService es = new CommandBatchService(executorService.getConnectionManager()); for (byte[] key : entry.getValue()) { es.writeAsync(entry.getKey(), null, command, key);
@Override public Long clusterCountKeysInSlot(int slot) { RedisClusterNode node = clusterGetNodeForSlot(slot); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); RFuture<Long> f = executorService.readAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_COUNTKEYSINSLOT, slot); return syncFuture(f); }
@Override public Long clusterCountKeysInSlot(int slot) { RedisClusterNode node = clusterGetNodeForSlot(slot); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); RFuture<Long> f = executorService.readAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_COUNTKEYSINSLOT, slot); return syncFuture(f); }
@Override public Long clusterCountKeysInSlot(int slot) { RedisClusterNode node = clusterGetNodeForSlot(slot); MasterSlaveEntry entry = executorService.getConnectionManager().getEntry(new InetSocketAddress(node.getHost(), node.getPort())); RFuture<Long> f = executorService.readAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_COUNTKEYSINSLOT, slot); return syncFuture(f); }
protected boolean isEvalCacheActive() { return getConnectionManager().getCfg().isUseScriptCache(); }