@Override public void watch(byte[]... keys) { if (isQueueing()) { throw new UnsupportedOperationException(); } syncFuture(executorService.writeAsync(null, RedisCommands.WATCH, keys)); }
@Override public List<String> getConfig(RedisClusterNode node, String pattern) { MasterSlaveEntry entry = getEntry(node); RFuture<List<String>> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_GET, pattern); return syncFuture(f); }
@Override public void resetConfigStats(RedisClusterNode node) { MasterSlaveEntry entry = getEntry(node); RFuture<Void> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_RESETSTAT); syncFuture(f); }
@Override public void resetConfigStats(RedisClusterNode node) { MasterSlaveEntry entry = getEntry(node); RFuture<Void> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_RESETSTAT); syncFuture(f); }
@Override public void resetConfigStats(RedisClusterNode node) { MasterSlaveEntry entry = getEntry(node); RFuture<Void> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_RESETSTAT); syncFuture(f); }
<T> T write(byte[] key, Codec codec, RedisCommand<?> command, Object... params) { RFuture<T> f = executorService.writeAsync(key, codec, command, params); indexCommand(command); return sync(f); }
@Override public void clusterSetSlot(RedisClusterNode node, int slot, AddSlots mode) { MasterSlaveEntry entry = getEntry(node); RFuture<Map<String, String>> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_SETSLOT, slot, mode); syncFuture(f); }
@Override public void clusterForget(RedisClusterNode node) { RFuture<Void> f = executorService.writeAsync((String)null, StringCodec.INSTANCE, RedisCommands.CLUSTER_FORGET, node.getId()); syncFuture(f); }
@Override public void setConfig(RedisClusterNode node, String param, String value) { MasterSlaveEntry entry = getEntry(node); RFuture<Void> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_SET, param, value); syncFuture(f); }
private <T> T execute(RedisClusterNode node, RedisCommand<T> command) { MasterSlaveEntry entry = getEntry(node); RFuture<T> f = executorService.writeAsync(entry, StringCodec.INSTANCE, command); return syncFuture(f); }
<T> T write(byte[] key, Codec codec, RedisCommand<?> command, Object... params) { RFuture<T> f = executorService.writeAsync(key, codec, command, params); indexCommand(command); return sync(f); }
@Override public void clusterAddSlots(RedisClusterNode node, int... slots) { MasterSlaveEntry entry = getEntry(node); List<Integer> params = convert(slots); RFuture<Map<String, String>> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_ADDSLOTS, params.toArray()); syncFuture(f); }
@Override public void clusterAddSlots(RedisClusterNode node, int... slots) { MasterSlaveEntry entry = getEntry(node); List<Integer> params = convert(slots); RFuture<Map<String, String>> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_ADDSLOTS, params.toArray()); syncFuture(f); }
@Override public void clusterDeleteSlots(RedisClusterNode node, int... slots) { MasterSlaveEntry entry = getEntry(node); List<Integer> params = convert(slots); RFuture<Long> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_DELSLOTS, params.toArray()); syncFuture(f); }
@Override public void clusterDeleteSlots(RedisClusterNode node, int... slots) { MasterSlaveEntry entry = getEntry(node); List<Integer> params = convert(slots); RFuture<Long> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_DELSLOTS, params.toArray()); syncFuture(f); }
@Override public void clusterMeet(RedisClusterNode node) { Assert.notNull(node, "Cluster node must not be null for CLUSTER MEET command!"); Assert.hasText(node.getHost(), "Node to meet cluster must have a host!"); Assert.isTrue(node.getPort() > 0, "Node to meet cluster must have a port greater 0!"); RFuture<Void> f = executorService.writeAsync((String)null, StringCodec.INSTANCE, RedisCommands.CLUSTER_MEET, node.getHost(), node.getPort()); syncFuture(f); }
@Override public void clusterReplicate(RedisClusterNode master, RedisClusterNode slave) { MasterSlaveEntry entry = getEntry(master); RFuture<Long> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CLUSTER_REPLICATE, slave.getId()); syncFuture(f); }
@Override public void discard() { if (isQueueing()) { syncFuture(executorService.writeAsync(null, RedisCommands.DISCARD)); resetConnection(); } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }
@Override public void discard() { if (isQueueing()) { syncFuture(executorService.writeAsync(null, RedisCommands.DISCARD)); resetConnection(); } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }
@Override public void discard() { if (isQueueing()) { syncFuture(executorService.writeAsync(null, RedisCommands.DISCARD)); resetConnection(); } else { throw new InvalidDataAccessApiUsageException("Not in transaction mode. Please invoke multi method"); } }