RGeo added to RBatch object. #522

pull/537/head
Nikita 9 years ago
parent 0227a0695d
commit f9c1dda0e1

@ -27,20 +27,20 @@ import org.redisson.core.RBitSetAsync;
import org.redisson.core.RBlockingDequeAsync;
import org.redisson.core.RBlockingQueueAsync;
import org.redisson.core.RBucketAsync;
import org.redisson.core.RMapCacheAsync;
import org.redisson.core.RDequeAsync;
import org.redisson.core.RGeoAsync;
import org.redisson.core.RHyperLogLogAsync;
import org.redisson.core.RKeysAsync;
import org.redisson.core.RLexSortedSetAsync;
import org.redisson.core.RListAsync;
import org.redisson.core.RListMultimap;
import org.redisson.core.RMapAsync;
import org.redisson.core.RMapCacheAsync;
import org.redisson.core.RMultimapAsync;
import org.redisson.core.RQueueAsync;
import org.redisson.core.RScoredSortedSetAsync;
import org.redisson.core.RScriptAsync;
import org.redisson.core.RSetAsync;
import org.redisson.core.RSetCacheAsync;
import org.redisson.core.RSetMultimap;
import org.redisson.core.RTopicAsync;
import io.netty.util.concurrent.Future;
@ -232,24 +232,33 @@ public class RedissonBatch implements RBatch {
}
@Override
public <K, V> RSetMultimap<K, V> getSetMultimap(String name) {
public <K, V> RMultimapAsync<K, V> getSetMultimap(String name) {
return new RedissonSetMultimap<K, V>(executorService, name);
}
@Override
public <K, V> RSetMultimap<K, V> getSetMultimap(String name, Codec codec) {
public <K, V> RMultimapAsync<K, V> getSetMultimap(String name, Codec codec) {
return new RedissonSetMultimap<K, V>(codec, executorService, name);
}
@Override
public <K, V> RListMultimap<K, V> getListMultimap(String name) {
public <K, V> RMultimapAsync<K, V> getListMultimap(String name) {
return new RedissonListMultimap<K, V>(executorService, name);
}
@Override
public <K, V> RListMultimap<K, V> getListMultimap(String name, Codec codec) {
public <K, V> RMultimapAsync<K, V> getListMultimap(String name, Codec codec) {
return new RedissonListMultimap<K, V>(codec, executorService, name);
}
@Override
public <V> RGeoAsync<V> getGeo(String name) {
return new RedissonGeo<V>(executorService, name);
}
@Override
public <V> RGeoAsync<V> getGeo(String name, Codec codec) {
return new RedissonGeo<V>(codec, executorService, name);
}
}

@ -37,13 +37,31 @@ import io.netty.util.concurrent.Future;
*/
public interface RBatch {
/**
* Returns geospatial items holder instance by <code>name</code>.
*
* @param name
* @return
*/
<V> RGeoAsync<V> getGeo(String name);
/**
* Returns geospatial items holder instance by <code>name</code>
* using provided codec for geospatial members.
*
* @param name
* @param geospatial member codec
* @return
*/
<V> RGeoAsync<V> getGeo(String name, Codec codec);
/**
* Returns Set based MultiMap instance by name.
*
* @param name
* @return
*/
<K, V> RSetMultimap<K, V> getSetMultimap(String name);
<K, V> RMultimapAsync<K, V> getSetMultimap(String name);
/**
* Returns Set based MultiMap instance by name
@ -53,7 +71,7 @@ public interface RBatch {
* @param codec
* @return
*/
<K, V> RSetMultimap<K, V> getSetMultimap(String name, Codec codec);
<K, V> RMultimapAsync<K, V> getSetMultimap(String name, Codec codec);
/**
* Returns set-based cache instance by <code>name</code>.
@ -142,7 +160,7 @@ public interface RBatch {
* @param name
* @return
*/
<K, V> RListMultimap<K, V> getListMultimap(String name);
<K, V> RMultimapAsync<K, V> getListMultimap(String name);
/**
* Returns List based MultiMap instance by name
@ -152,7 +170,7 @@ public interface RBatch {
* @param codec
* @return
*/
<K, V> RListMultimap<K, V> getListMultimap(String name, Codec codec);
<K, V> RMultimapAsync<K, V> getListMultimap(String name, Codec codec);
/**
* Returns map instance by name.

Loading…
Cancel
Save