Fixed - missed getSetMultimapCache() and getListMultimapCache() methods in RBatchReactive object

pull/6137/head
Nikita Koksharov 5 months ago
parent e3c015eb19
commit 11706e00e7

@ -99,7 +99,32 @@ public interface RBatchReactive {
* @return SetMultimap object
*/
<K, V> RSetMultimapReactive<K, V> getSetMultimap(String name, Codec codec);
/**
* Returns Set based Multimap cache instance by name.
* Supports key eviction by specifying a time to live.
* If eviction is not required then it's better to use regular set multimap {@link #getSetMultimap(String)}.
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return RSetMultimapCacheRx object
*/
<K, V> RSetMultimapCacheReactive<K, V> getSetMultimapCache(String name);
/**
* Returns Set based Multimap cache instance by name using provided codec for both map keys and values.
* Supports key eviction by specifying a time to live.
* If eviction is not required then it's better to use regular set multimap {@link #getSetMultimap(String, Codec)}.
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return RSetMultimapCacheRx object
*/
<K, V> RSetMultimapCacheReactive<K, V> getSetMultimapCache(String name, Codec codec);
/**
* Returns set-based cache instance by <code>name</code>.
* Uses map (value_hash, value) under the hood for minimal memory consumption.
@ -318,7 +343,32 @@ public interface RBatchReactive {
* @return ListMultimap object
*/
<K, V> RListMultimapReactive<K, V> getListMultimap(String name, Codec codec);
/**
* Returns List based Multimap cache instance by name.
* Supports key eviction by specifying a time to live.
* If eviction is not required then it's better to use regular list multimap {@link #getListMultimap(String)}.
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @return RListMultimapCacheRx object
*/
<K, V> RListMultimapReactive<K, V> getListMultimapCache(String name);
/**
* Returns List based Multimap cache instance by name using provided codec for both map keys and values.
* Supports key eviction by specifying a time to live.
* If eviction is not required then it's better to use regular list multimap {@link #getListMultimap(String, Codec)}.
*
* @param <K> type of key
* @param <V> type of value
* @param name - name of object
* @param codec - codec for keys and values
* @return RListMultimapCacheRx object
*/
<K, V> RListMultimapReactive<K, V> getListMultimapCache(String name, Codec codec);
/**
* Returns map instance by name.
*

@ -330,6 +330,20 @@ public class RedissonBatchReactive implements RBatchReactive {
new RedissonSetMultimapReactive<K, V>(codec, executorService, name, null), RSetMultimapReactive.class);
}
@Override
public <K, V> RSetMultimapCacheReactive<K, V> getSetMultimapCache(String name) {
RSetMultimap<K, V> map = new RedissonSetMultimapCache<>(evictionScheduler, executorService, name);
return ReactiveProxyBuilder.create(executorService, map,
new RedissonSetMultimapCacheReactive<>(map, executorService, null), RSetMultimapCacheReactive.class);
}
@Override
public <K, V> RSetMultimapCacheReactive<K, V> getSetMultimapCache(String name, Codec codec) {
RSetMultimap<K, V> map = new RedissonSetMultimapCache<>(evictionScheduler, codec, executorService, name);
return ReactiveProxyBuilder.create(executorService, map,
new RedissonSetMultimapCacheReactive<>(map, executorService, null), RSetMultimapCacheReactive.class);
}
@Override
public <K, V> RListMultimapReactive<K, V> getListMultimap(String name) {
return ReactiveProxyBuilder.create(executorService, new RedissonListMultimap<K, V>(executorService, name),
@ -342,6 +356,20 @@ public class RedissonBatchReactive implements RBatchReactive {
new RedissonListMultimapReactive<K, V>(codec, executorService, name), RListMultimapReactive.class);
}
@Override
public <K, V> RListMultimapReactive<K, V> getListMultimapCache(String name) {
RListMultimap<K, V> map = new RedissonListMultimapCache<>(evictionScheduler, executorService, name);
return ReactiveProxyBuilder.create(executorService, map,
new RedissonListMultimapCacheReactive<>(map, executorService), RListMultimapReactive.class);
}
@Override
public <K, V> RListMultimapReactive<K, V> getListMultimapCache(String name, Codec codec) {
RListMultimap<K, V> map = new RedissonListMultimapCache<>(evictionScheduler, codec, executorService, name);
return ReactiveProxyBuilder.create(executorService, map,
new RedissonListMultimapCacheReactive<>(map, executorService), RListMultimapReactive.class);
}
@Override
public RAtomicDoubleReactive getAtomicDouble(String name) {
return ReactiveProxyBuilder.create(executorService, new RedissonAtomicDouble(executorService, name), RAtomicDoubleReactive.class);

Loading…
Cancel
Save