public CommandRxBatchService(ConnectionManager connectionManager) { super(connectionManager); batchService = new CommandBatchService(connectionManager); }
public CommandReactiveBatchService(ConnectionManager connectionManager) { super(connectionManager); batchService = new CommandBatchService(connectionManager); }
public RedissonBatch(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, BatchOptions options) { this.executorService = new CommandBatchService(connectionManager, options); this.evictionScheduler = evictionScheduler; this.options = options; }
public RedissonBatch(EvictionScheduler evictionScheduler, ConnectionManager connectionManager, BatchOptions options) { this.executorService = new CommandBatchService(connectionManager, options); this.evictionScheduler = evictionScheduler; this.options = options; }
public CommandRxBatchService(ConnectionManager connectionManager) { super(connectionManager); batchService = new CommandBatchService(connectionManager); }
public CommandReactiveBatchService(ConnectionManager connectionManager) { super(connectionManager); batchService = new CommandBatchService(connectionManager); }
public TasksBatchService(Codec codec, RedissonClient redisson, String name, CommandExecutor commandExecutor, String executorId, ConcurrentMap<String, ResponseEntry> responses) { super(codec, redisson, name, commandExecutor, executorId, responses); batchCommandService = new CommandBatchService(commandExecutor.getConnectionManager()); }
public TasksBatchService(Codec codec, RedissonClient redisson, String name, CommandExecutor commandExecutor, String executorId, ConcurrentMap<String, ResponseEntry> responses) { super(codec, redisson, name, commandExecutor, executorId, responses); batchCommandService = new CommandBatchService(commandExecutor.getConnectionManager()); }
@Override public void openPipeline() { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
@Override public void openPipeline() { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
@Override public void openPipeline() { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
@Override public void openPipeline() { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
public void rollback(List<TransactionalOperation> operations) { checkState(); CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (TransactionalOperation transactionalOperation : operations) { transactionalOperation.rollback(executorService); } try { executorService.execute(); } catch (Exception e) { throw new TransactionException("Unable to rollback transaction", e); } operations.clear(); executed.set(true); }
public void rollback(List<TransactionalOperation> operations) { checkState(); CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (TransactionalOperation transactionalOperation : operations) { transactionalOperation.rollback(executorService); } try { executorService.execute(); } catch (Exception e) { throw new TransactionException("Unable to rollback transaction", e); } operations.clear(); executed.set(true); }
@Override public void multi() { if (isQueueing()) { return; } if (isPipelined()) { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY_ATOMIC); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); return; } BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.REDIS_WRITE_ATOMIC); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
@Override public void multi() { if (isQueueing()) { return; } if (isPipelined()) { BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.IN_MEMORY_ATOMIC); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); return; } BatchOptions options = BatchOptions.defaults() .executionMode(ExecutionMode.REDIS_WRITE_ATOMIC); this.executorService = new CommandBatchService(redisson.getConnectionManager(), options); }
@Override public RFuture<Void> setAsync(long fromIndex, long toIndex, boolean value) { CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (long i = fromIndex; i < toIndex; i++) { executorService.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.SETBIT_VOID, getName(), i, value ? 1 : 0); } return executorService.executeAsyncVoid(); }
@Override public RFuture<Void> setAsync(long fromIndex, long toIndex, boolean value) { CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); for (long i = fromIndex; i < toIndex; i++) { executorService.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.SETBIT_VOID, getName(), i, value ? 1 : 0); } return executorService.executeAsyncVoid(); }
@Override public long count() { CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); RFuture<Map<String, String>> configFuture = executorService.readAsync(configName, StringCodec.INSTANCE, new RedisCommand<Map<Object, Object>>("HGETALL", new ObjectMapReplayDecoder()), configName); RBitSetAsync bs = createBitSet(executorService); RFuture<Long> cardinalityFuture = bs.cardinalityAsync(); executorService.execute(); readConfig(configFuture.getNow()); return Math.round(-size / ((double) hashIterations) * Math.log(1 - cardinalityFuture.getNow() / ((double) size))); }
@Override public long count() { CommandBatchService executorService = new CommandBatchService(commandExecutor.getConnectionManager()); RFuture<Map<String, String>> configFuture = executorService.readAsync(configName, StringCodec.INSTANCE, new RedisCommand<Map<Object, Object>>("HGETALL", new ObjectMapReplayDecoder()), configName); RBitSetAsync bs = createBitSet(executorService); RFuture<Long> cardinalityFuture = bs.cardinalityAsync(); executorService.execute(); readConfig(configFuture.getNow()); return Math.round(-size / ((double) hashIterations) * Math.log(1 - cardinalityFuture.getNow() / ((double) size))); }