Fixed empty result handling for RGeo.radiusStoreTo methods

pull/672/merge
Nikita 8 years ago
parent e544b8ae30
commit f54c462298

@ -407,63 +407,63 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
} }
@Override @Override
public int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) { public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) {
return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit)); return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) { public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) {
return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE_INT, getName(), convert(longitude), convert(latitude), radius, geoUnit, "STORE", destName); return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE, getName(), convert(longitude), convert(latitude), radius, geoUnit, "STORE", destName);
} }
@Override @Override
public int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) { public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) {
return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, count)); return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, count));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) { public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) {
return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE_INT, getName(), convert(longitude), convert(latitude), radius, geoUnit, "COUNT", count, "STORE", destName); return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE, getName(), convert(longitude), convert(latitude), radius, geoUnit, "COUNT", count, "STORE", destName);
} }
@Override @Override
public int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) { public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) {
return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, geoOrder, count)); return get(radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, geoOrder, count));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) { public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) {
return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE_INT, getName(), convert(longitude), convert(latitude), radius, geoUnit, geoOrder, "COUNT", count, "STORE", destName); return commandExecutor.writeAsync(getName(), LongCodec.INSTANCE, RedisCommands.GEORADIUS_STORE, getName(), convert(longitude), convert(latitude), radius, geoUnit, geoOrder, "COUNT", count, "STORE", destName);
} }
@Override @Override
public int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit) { public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit) {
return get(radiusStoreToAsync(destName, member, radius, geoUnit)); return get(radiusStoreToAsync(destName, member, radius, geoUnit));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit) { public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit) {
return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE_INT, getName(), member, radius, geoUnit, "STORE", destName); return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE, getName(), member, radius, geoUnit, "STORE", destName);
} }
@Override @Override
public int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count) { public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count) {
return get(radiusStoreToAsync(destName, member, radius, geoUnit, count)); return get(radiusStoreToAsync(destName, member, radius, geoUnit, count));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count) { public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count) {
return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE_INT, getName(), member, radius, geoUnit, "COUNT", count, "STORE", destName); return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE, getName(), member, radius, geoUnit, "COUNT", count, "STORE", destName);
} }
@Override @Override
public int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) { public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) {
return get(radiusStoreToAsync(destName, member, radius, geoUnit, geoOrder, count)); return get(radiusStoreToAsync(destName, member, radius, geoUnit, geoOrder, count));
} }
@Override @Override
public RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) { public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) {
return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE_INT, getName(), member, radius, geoUnit, geoOrder, "COUNT", count, "STORE", destName); return commandExecutor.writeAsync(getName(), codec, RedisCommands.GEORADIUSBYMEMBER_STORE, getName(), member, radius, geoUnit, geoOrder, "COUNT", count, "STORE", destName);
} }
} }

@ -459,7 +459,7 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param geoUnit - geo unit * @param geoUnit - geo unit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit); long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -476,7 +476,7 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count); long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -495,7 +495,7 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -510,7 +510,7 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param geoUnit - geo unit * @param geoUnit - geo unit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit); long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -526,7 +526,7 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count); long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -543,6 +543,6 @@ public interface RGeo<V> extends RScoredSortedSet<V>, RGeoAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
int radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count);
} }

@ -457,7 +457,7 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param geoUnit - geo unit * @param geoUnit - geo unit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit); RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -474,7 +474,7 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count); RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -493,7 +493,7 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -508,7 +508,7 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param geoUnit - geo unit * @param geoUnit - geo unit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit); RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -524,7 +524,7 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count); RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count);
/** /**
* Finds the members of a sorted set, which are within the * Finds the members of a sorted set, which are within the
@ -541,6 +541,6 @@ public interface RGeoAsync<V> extends RScoredSortedSetAsync<V> {
* @param count - result limit * @param count - result limit
* @return length of result * @return length of result
*/ */
RFuture<Integer> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count);
} }

@ -45,6 +45,8 @@ import org.redisson.client.protocol.decoder.KeyValueObjectDecoder;
import org.redisson.client.protocol.decoder.ListResultReplayDecoder; import org.redisson.client.protocol.decoder.ListResultReplayDecoder;
import org.redisson.client.protocol.decoder.ListScanResult; import org.redisson.client.protocol.decoder.ListScanResult;
import org.redisson.client.protocol.decoder.ListScanResultReplayDecoder; import org.redisson.client.protocol.decoder.ListScanResultReplayDecoder;
import org.redisson.client.protocol.decoder.Long2MultiDecoder;
import org.redisson.client.protocol.decoder.LongMultiDecoder;
import org.redisson.client.protocol.decoder.MapScanResult; import org.redisson.client.protocol.decoder.MapScanResult;
import org.redisson.client.protocol.decoder.MapScanResultReplayDecoder; import org.redisson.client.protocol.decoder.MapScanResultReplayDecoder;
import org.redisson.client.protocol.decoder.NestedMultiDecoder; import org.redisson.client.protocol.decoder.NestedMultiDecoder;
@ -76,8 +78,8 @@ public interface RedisCommands {
RedisCommand<Double> GEODIST = new RedisCommand<Double>("GEODIST", new DoubleReplayConvertor(), 2, Arrays.asList(ValueType.OBJECT, ValueType.OBJECT, ValueType.STRING)); RedisCommand<Double> GEODIST = new RedisCommand<Double>("GEODIST", new DoubleReplayConvertor(), 2, Arrays.asList(ValueType.OBJECT, ValueType.OBJECT, ValueType.STRING));
RedisCommand<List<Object>> GEORADIUS = new RedisCommand<List<Object>>("GEORADIUS", new ObjectListReplayDecoder<Object>()); RedisCommand<List<Object>> GEORADIUS = new RedisCommand<List<Object>>("GEORADIUS", new ObjectListReplayDecoder<Object>());
RedisCommand<List<Object>> GEORADIUSBYMEMBER = new RedisCommand<List<Object>>("GEORADIUSBYMEMBER", new ObjectListReplayDecoder<Object>(), 2); RedisCommand<List<Object>> GEORADIUSBYMEMBER = new RedisCommand<List<Object>>("GEORADIUSBYMEMBER", new ObjectListReplayDecoder<Object>(), 2);
RedisStrictCommand<Integer> GEORADIUS_STORE_INT = new RedisStrictCommand<Integer>("GEORADIUS", new IntegerReplayConvertor()); RedisCommand<Object> GEORADIUS_STORE = new RedisCommand<Object>("GEORADIUS", new Long2MultiDecoder());
RedisStrictCommand<Integer> GEORADIUSBYMEMBER_STORE_INT = new RedisStrictCommand<Integer>("GEORADIUSBYMEMBER", new IntegerReplayConvertor(), 2); RedisCommand<Object> GEORADIUSBYMEMBER_STORE = new RedisCommand<Object>("GEORADIUSBYMEMBER", new Long2MultiDecoder(), 2);
RedisStrictCommand<Integer> KEYSLOT = new RedisStrictCommand<Integer>("CLUSTER", "KEYSLOT", new IntegerReplayConvertor()); RedisStrictCommand<Integer> KEYSLOT = new RedisStrictCommand<Integer>("CLUSTER", "KEYSLOT", new IntegerReplayConvertor());
RedisStrictCommand<RType> TYPE = new RedisStrictCommand<RType>("TYPE", new TypeConvertor()); RedisStrictCommand<RType> TYPE = new RedisStrictCommand<RType>("TYPE", new TypeConvertor());

@ -15,6 +15,11 @@
*/ */
package org.redisson.client.protocol.decoder; package org.redisson.client.protocol.decoder;
/**
*
* @author Nikita Koksharov
*
*/
public interface DecoderState { public interface DecoderState {
DecoderState copy(); DecoderState copy();

@ -23,8 +23,12 @@ import org.redisson.client.codec.DoubleCodec;
import org.redisson.client.handler.State; import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class GeoDistanceDecoder implements MultiDecoder<List<Object>> { public class GeoDistanceDecoder implements MultiDecoder<List<Object>> {
private final ThreadLocal<Integer> pos = new ThreadLocal<Integer>(); private final ThreadLocal<Integer> pos = new ThreadLocal<Integer>();

@ -26,6 +26,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class GeoDistanceMapDecoder implements MultiDecoder<Map<Object, Object>> { public class GeoDistanceMapDecoder implements MultiDecoder<Map<Object, Object>> {
private final ThreadLocal<Integer> pos = new ThreadLocal<Integer>(); private final ThreadLocal<Integer> pos = new ThreadLocal<Integer>();

@ -23,6 +23,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class GeoMapReplayDecoder implements MultiDecoder<Map<Object, Object>> { public class GeoMapReplayDecoder implements MultiDecoder<Map<Object, Object>> {
@Override @Override

@ -24,6 +24,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class GeoPositionDecoder implements MultiDecoder<GeoPosition> { public class GeoPositionDecoder implements MultiDecoder<GeoPosition> {
@Override @Override

@ -25,6 +25,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class GeoPositionMapDecoder implements MultiDecoder<Map<Object, Object>> { public class GeoPositionMapDecoder implements MultiDecoder<Map<Object, Object>> {
private final List<Object> args; private final List<Object> args;

@ -15,6 +15,13 @@
*/ */
package org.redisson.client.protocol.decoder; package org.redisson.client.protocol.decoder;
/**
*
* @author Nikita Koksharov
*
* @param <K> key type
* @param <V> value type
*/
public class KeyValueMessage<K, V> { public class KeyValueMessage<K, V> {
private K key; private K key;

@ -22,6 +22,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class KeyValueObjectDecoder implements MultiDecoder<Object> { public class KeyValueObjectDecoder implements MultiDecoder<Object> {
@Override @Override

@ -21,6 +21,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class ListFirstObjectDecoder implements MultiDecoder<Object> { public class ListFirstObjectDecoder implements MultiDecoder<Object> {
@Override @Override

@ -21,6 +21,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class ListIteratorReplayDecoder implements MultiDecoder<ListIteratorResult<Object>> { public class ListIteratorReplayDecoder implements MultiDecoder<ListIteratorResult<Object>> {
@Override @Override

@ -15,6 +15,12 @@
*/ */
package org.redisson.client.protocol.decoder; package org.redisson.client.protocol.decoder;
/**
*
* @author Nikita Koksharov
*
* @param <V> value type
*/
public class ListIteratorResult<V> { public class ListIteratorResult<V> {
private final V element; private final V element;

@ -22,6 +22,12 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class ListMultiDecoder<T> implements MultiDecoder<Object> { public class ListMultiDecoder<T> implements MultiDecoder<Object> {
private final MultiDecoder<?>[] decoders; private final MultiDecoder<?>[] decoders;

@ -24,6 +24,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class ListResultReplayDecoder implements MultiDecoder<List<Map<Object, Object>>> { public class ListResultReplayDecoder implements MultiDecoder<List<Map<Object, Object>>> {
@Override @Override

@ -20,6 +20,12 @@ import java.util.List;
import org.redisson.RedisClientResult; import org.redisson.RedisClientResult;
/**
*
* @author Nikita Koksharov
*
* @param <V> value type
*/
public class ListScanResult<V> implements RedisClientResult { public class ListScanResult<V> implements RedisClientResult {
private final Long pos; private final Long pos;

@ -22,6 +22,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class ListScanResultReplayDecoder implements MultiDecoder<ListScanResult<Object>> { public class ListScanResultReplayDecoder implements MultiDecoder<ListScanResult<Object>> {
@Override @Override

@ -0,0 +1,37 @@
/**
* Copyright 2016 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.redisson.client.protocol.decoder;
import java.util.List;
import org.redisson.client.handler.State;
/**
*
* @author Nikita Koksharov
*
*/
public class Long2MultiDecoder extends LongMultiDecoder {
@Override
public Object decode(List<Object> parts, State state) {
if (parts.isEmpty()) {
return 0L;
}
return null;
}
}

@ -23,6 +23,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class LongMultiDecoder implements MultiDecoder<Object> { public class LongMultiDecoder implements MultiDecoder<Object> {
@Override @Override

@ -18,6 +18,13 @@ package org.redisson.client.protocol.decoder;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
*
* @author Nikita Koksharov
*
* @param <K> key type
* @param <V> value type
*/
public class MapCacheScanResult<K, V> extends MapScanResult<K, V> { public class MapCacheScanResult<K, V> extends MapScanResult<K, V> {
private final List<K> idleKeys; private final List<K> idleKeys;

@ -23,6 +23,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class MapCacheScanResultReplayDecoder implements MultiDecoder<MapCacheScanResult<Object, Object>> { public class MapCacheScanResultReplayDecoder implements MultiDecoder<MapCacheScanResult<Object, Object>> {
@Override @Override

@ -20,6 +20,13 @@ import java.util.Map;
import org.redisson.RedisClientResult; import org.redisson.RedisClientResult;
/**
*
* @author Nikita Koksharov
*
* @param <K> key type
* @param <V> value type
*/
public class MapScanResult<K, V> implements RedisClientResult { public class MapScanResult<K, V> implements RedisClientResult {
private final Long pos; private final Long pos;

@ -23,6 +23,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class MapScanResultReplayDecoder implements MultiDecoder<MapScanResult<Object, Object>> { public class MapScanResultReplayDecoder implements MultiDecoder<MapScanResult<Object, Object>> {
@Override @Override

@ -21,6 +21,12 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class ObjectFirstResultReplayDecoder<T> implements MultiDecoder<T> { public class ObjectFirstResultReplayDecoder<T> implements MultiDecoder<T> {
@Override @Override

@ -23,6 +23,12 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class ObjectListDecoder<T> implements MultiDecoder<List<T>> { public class ObjectListDecoder<T> implements MultiDecoder<List<T>> {
private Codec codec; private Codec codec;

@ -17,6 +17,11 @@ package org.redisson.client.protocol.decoder;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
/**
*
* @author Nikita Koksharov
*
*/
public class ScanObjectEntry { public class ScanObjectEntry {
private final ByteBuf buf; private final ByteBuf buf;

@ -25,6 +25,12 @@ import org.redisson.client.protocol.ScoredEntry;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class ScoredSortedSetReplayDecoder<T> implements MultiDecoder<List<ScoredEntry<T>>> { public class ScoredSortedSetReplayDecoder<T> implements MultiDecoder<List<ScoredEntry<T>>> {
@Override @Override

@ -22,6 +22,12 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class ScoredSortedSetScanDecoder<T> extends ObjectListReplayDecoder<T> { public class ScoredSortedSetScanDecoder<T> extends ObjectListReplayDecoder<T> {
@Override @Override

@ -22,6 +22,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class ScoredSortedSetScanReplayDecoder implements MultiDecoder<ListScanResult<Object>> { public class ScoredSortedSetScanReplayDecoder implements MultiDecoder<ListScanResult<Object>> {
@Override @Override

@ -28,6 +28,11 @@ import org.redisson.cluster.ClusterSlotRange;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class SlotsDecoder implements MultiDecoder<Object> { public class SlotsDecoder implements MultiDecoder<Object> {
@Override @Override

@ -21,6 +21,11 @@ import org.redisson.client.protocol.Decoder;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class StringDataDecoder implements Decoder<String> { public class StringDataDecoder implements Decoder<String> {
@Override @Override

@ -23,6 +23,11 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class StringListReplayDecoder implements MultiDecoder<List<String>> { public class StringListReplayDecoder implements MultiDecoder<List<String>> {
@Override @Override

@ -24,6 +24,11 @@ import org.redisson.client.protocol.Decoder;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class StringMapDataDecoder implements Decoder<Map<String, String>> { public class StringMapDataDecoder implements Decoder<Map<String, String>> {
@Override @Override

@ -21,6 +21,11 @@ import org.redisson.client.protocol.Decoder;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
*/
public class StringReplayDecoder implements Decoder<String> { public class StringReplayDecoder implements Decoder<String> {
@Override @Override

@ -22,6 +22,12 @@ import org.redisson.client.handler.State;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.util.CharsetUtil; import io.netty.util.CharsetUtil;
/**
*
* @author Nikita Koksharov
*
* @param <T> type
*/
public class TTLMapValueReplayDecoder<T> implements MultiDecoder<List<T>> { public class TTLMapValueReplayDecoder<T> implements MultiDecoder<List<T>> {
@Override @Override

Loading…
Cancel
Save