@Override public void set(V value) { get(setAsync(value)); }
@Override public void set(V value, long timeToLive, TimeUnit timeUnit) { get(setAsync(value, timeToLive, timeUnit)); }
@Override public void set(V value, long timeToLive, TimeUnit timeUnit) { get(setAsync(value, timeToLive, timeUnit)); }
@Override public void set(V value) { get(setAsync(value)); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); if (timeToLive != 0) { bucket.setAsync((V) value, timeToLive, timeUnit); } else { bucket.setAsync((V) value); } RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); if (timeToLive != 0) { bucket.setAsync((V) value, timeToLive, timeUnit); } else { bucket.setAsync((V) value); } RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public RFuture<Void> setAsync(byte[] value) { if (value.length > 512*1024*1024) { RPromise<Void> result = new RedissonPromise<Void>(); int chunkSize = 10*1024*1024; write(value, result, chunkSize, 0); return result; } return super.setAsync(value); }
@Override public RFuture<Void> setAsync(byte[] value) { if (value.length > 512*1024*1024) { RPromise<Void> result = new RedissonPromise<Void>(); int chunkSize = 10*1024*1024; write(value, result, chunkSize, 0); return result; } return super.setAsync(value); }
@Override public void set(V value, long timeToLive, TimeUnit timeUnit) { get(setAsync(value, timeToLive, timeUnit)); }
@Override public void set(V value) { get(setAsync(value)); }
@Override public void commit(CommandAsyncExecutor commandExecutor) { RedissonBucket<V> bucket = new RedissonBucket<V>(codec, commandExecutor, name); if (timeToLive != 0) { bucket.setAsync((V) value, timeToLive, timeUnit); } else { bucket.setAsync((V) value); } RedissonLock lock = new RedissonLock(commandExecutor, lockName); lock.unlockAsync(); }
@Override public RFuture<Void> setAsync(byte[] value) { if (value.length > 512*1024*1024) { RPromise<Void> result = new RedissonPromise<Void>(); int chunkSize = 10*1024*1024; write(value, result, chunkSize, 0); return result; } return super.setAsync(value); }