public RemoveOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public RemoveCacheOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public RemoveCacheOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public MoveOperation(RObject set, String destinationName, long threadId, Object value, String transactionId) { this(set.getName(), set.getCodec(), destinationName, threadId, value, transactionId); }
public AddOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public AddCacheOperation(RObject set, Object value, long ttl, TimeUnit timeUnit, String transactionId) { this(set.getName(), set.getCodec(), value, ttl, timeUnit, transactionId); }
public AddCacheOperation(RObject set, Object value, long ttl, TimeUnit timeUnit, String transactionId) { this(set.getName(), set.getCodec(), value, ttl, timeUnit, transactionId); }
public RemoveOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public MoveOperation(RObject set, String destinationName, long threadId, Object value, String transactionId) { this(set.getName(), set.getCodec(), destinationName, threadId, value, transactionId); }
public AddOperation(RObject set, Object value, String transactionId) { this(set.getName(), set.getCodec(), value, transactionId); }
public MapReduceExecutor(RObject object, RedissonClient redisson, ConnectionManager connectionManager) { this.objectName = object.getName(); this.objectCodec = object.getCodec(); this.objectClass = object.getClass(); this.redisson = redisson; UUID id = UUID.randomUUID(); this.resultMapName = object.getName() + ":result:" + id; this.executorService = redisson.getExecutorService(RExecutorService.MAPREDUCE_NAME); this.connectionManager = connectionManager; }
public MapReduceExecutor(RObject object, RedissonClient redisson, ConnectionManager connectionManager) { this.objectName = object.getName(); this.objectCodec = object.getCodec(); this.objectClass = object.getClass(); this.redisson = redisson; UUID id = UUID.randomUUID(); this.resultMapName = object.getName() + ":result:" + id; this.executorService = redisson.getExecutorService(RExecutorService.MAPREDUCE_NAME); this.connectionManager = connectionManager; }
public void store(RObject ar, String fieldName, RMap<String, Object> liveMap) { Codec codec = ar.getCodec(); if (codec != null) { codecProvider.registerCodec((Class) codec.getClass(), codec); } liveMap.fastPut(fieldName, new RedissonReference(ar.getClass(), ar.getName(), codec)); }
public RFuture<Boolean> expireKeyAsync(K key, long timeToLive, TimeUnit timeUnit) { long ttlTimeout = System.currentTimeMillis() + timeUnit.toMillis(timeToLive); return commandExecutor.evalWriteAsync(object.getName(), object.getCodec(), RedisCommands.EVAL_BOOLEAN, "if redis.call('hexists', KEYS[1], ARGV[2]) == 1 then " + "if tonumber(ARGV[1]) > 0 then " + "redis.call('zadd', KEYS[2], ARGV[1], ARGV[2]); " + "else " + "redis.call('zrem', KEYS[2], ARGV[2]); " + "end; " + "return 1; " + "else " + "return 0; " + "end", Arrays.<Object>asList(object.getName(), timeoutSetName), ttlTimeout, ((RedissonObject)object).encodeMapKey(key)); }
public void store(RObject ar, String fieldName, RMap<String, Object> liveMap) { Codec codec = ar.getCodec(); if (codec != null) { codecProvider.registerCodec((Class) codec.getClass(), codec); } liveMap.fastPut(fieldName, new RedissonReference(ar.getClass(), ar.getName(), codec)); }
public RFuture<Boolean> expireKeyAsync(K key, long timeToLive, TimeUnit timeUnit) { long ttlTimeout = System.currentTimeMillis() + timeUnit.toMillis(timeToLive); return commandExecutor.evalWriteAsync(object.getName(), object.getCodec(), RedisCommands.EVAL_BOOLEAN, "if redis.call('hexists', KEYS[1], ARGV[2]) == 1 then " + "if tonumber(ARGV[1]) > 0 then " + "redis.call('zadd', KEYS[2], ARGV[1], ARGV[2]); " + "else " + "redis.call('zrem', KEYS[2], ARGV[2]); " + "end; " + "return 1; " + "else " + "return 0; " + "end", Arrays.<Object>asList(object.getName(), timeoutSetName), ttlTimeout, ((RedissonObject)object).encodeMapKey(key)); }
public RFuture<Boolean> moveAsync(final String destination, final V value) { RSet<V> destinationSet = new RedissonSet<V>(object.getCodec(), commandExecutor, destination, null);
public RFuture<Boolean> moveAsync(final String destination, final V value) { RSet<V> destinationSet = new RedissonSet<V>(object.getCodec(), commandExecutor, destination, null);