@author Nikita Koksharov
| 29 | * |
| 30 | */ |
| 31 | public class RedissonBatch implements RBatch { |
| 32 | |
| 33 | private final EvictionScheduler evictionScheduler; |
| 34 | private final CommandBatchService executorService; |
| 35 | |
| 36 | public RedissonBatch(EvictionScheduler evictionScheduler, CommandAsyncExecutor executor, BatchOptions options) { |
| 37 | this.executorService = executor.createCommandBatchService(options); |
| 38 | this.evictionScheduler = evictionScheduler; |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | public <V> RArrayAsync<V> getArray(String name) { |
| 43 | return new RedissonArray<V>(executorService, name); |
| 44 | } |
| 45 | |
| 46 | @Override |
| 47 | public <V> RArrayAsync<V> getArray(String name, Codec codec) { |
| 48 | return new RedissonArray<V>(codec, executorService, name); |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public <V> RBucketAsync<V> getBucket(String name) { |
| 53 | return new RedissonBucket<V>(executorService, name); |
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public <V> RBucketAsync<V> getBucket(String name, Codec codec) { |
| 58 | return new RedissonBucket<V>(codec, executorService, name); |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public <V> RJsonBucketAsync<V> getJsonBucket(String name, JsonCodec codec) { |
| 63 | return new RedissonJsonBucket<>(codec, executorService, name); |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public <V> RHyperLogLogAsync<V> getHyperLogLog(String name) { |
| 68 | return new RedissonHyperLogLog<V>(executorService, name); |
| 69 | } |
| 70 | |
| 71 | @Override |
| 72 | public <V> RHyperLogLogAsync<V> getHyperLogLog(String name, Codec codec) { |
| 73 | return new RedissonHyperLogLog<V>(codec, executorService, name); |
| 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public <V> RListAsync<V> getList(String name) { |
| 78 | return new RedissonList<V>(executorService, name, null); |
| 79 | } |
| 80 | |
| 81 | @Override |
| 82 | public <V> RListAsync<V> getList(String name, Codec codec) { |
| 83 | return new RedissonList<V>(codec, executorService, name, null); |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public <K, V> RMapAsync<K, V> getMap(String name) { |
| 88 | return new RedissonMap<K, V>(executorService, name, null, null, null); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…