Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<redisson.version>3.13.4</redisson.version>
<redisson.version>3.16.6</redisson.version>
<junit.version>5.6.2</junit.version>
<java.version>1.8</java.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public RedisAIClient(Config config) {
}

public RedisAI getRedisAI() {
return new RedisAI(getConnectionManager().getCommandExecutor());
return new RedisAI(getCommandExecutor());
}

public Void flushall() {
CommandAsyncExecutor commandExecutor = getConnectionManager().getCommandExecutor();
CommandAsyncExecutor commandExecutor = getCommandExecutor();
return commandExecutor.get(commandExecutor.writeAllAsync(RedisCommands.FLUSHALL));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@
import io.github.dengliming.redismodule.redisai.Device;
import io.github.dengliming.redismodule.redisai.model.Model;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;

public class ModelDecoder implements MultiDecoder<Model> {

@Override
public Decoder<Object> getDecoder(int i, State state) {
return null;
}

@Override
public Model decode(List<Object> list, State state) {
Backend backend = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@
import io.github.dengliming.redismodule.redisai.Device;
import io.github.dengliming.redismodule.redisai.model.Script;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;

public class ScriptDecoder implements MultiDecoder<Script> {

@Override
public Decoder<Object> getDecoder(int i, State state) {
return null;
}

@Override
public Script decode(List<Object> list, State state) {
String source = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@
import io.github.dengliming.redismodule.redisai.DataType;
import io.github.dengliming.redismodule.redisai.model.Tensor;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;

public class TensorDecoder implements MultiDecoder<Tensor> {

@Override
public Decoder<Object> getDecoder(int i, State state) {
return null;
}

@Override
public Tensor decode(List<Object> list, State state) {
DataType dataType = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ public RedisBloomClient(Config config) {
}

public BloomFilter getRBloomFilter(String name) {
return new BloomFilter(getConnectionManager().getCommandExecutor(), name);
return new BloomFilter(getCommandExecutor(), name);
}

public CountMinSketch getCountMinSketch(String name) {
return new CountMinSketch(getConnectionManager().getCommandExecutor(), name);
return new CountMinSketch(getCommandExecutor(), name);
}

public CuckooFilter getCuckooFilter(String name) {
return new CuckooFilter(getConnectionManager().getCommandExecutor(), name);
return new CuckooFilter(getCommandExecutor(), name);
}

public TopKFilter getTopKFilter(String name) {
return new TopKFilter(getConnectionManager().getCommandExecutor(), name);
return new TopKFilter(getCommandExecutor(), name);
}

public TDigest getTDigest(String name) {
return new TDigest(getConnectionManager().getCommandExecutor(), name);
return new TDigest(getCommandExecutor(), name);
}

public Void flushall() {
CommandAsyncExecutor commandExecutor = getConnectionManager().getCommandExecutor();
CommandAsyncExecutor commandExecutor = getCommandExecutor();
return commandExecutor.get(commandExecutor.writeAllAsync(RedisCommands.FLUSHALL));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisbloom.model.BloomFilterInfo;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;
Expand All @@ -28,11 +27,6 @@
*/
public class BloomFilterDecoder implements MultiDecoder<BloomFilterInfo> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public BloomFilterInfo decode(List<Object> parts, State state) {
return new BloomFilterInfo(((Long) parts.get(1)).intValue(), ((Long) parts.get(3)).intValue(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisbloom.model.ChunksData;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;
Expand All @@ -28,11 +27,6 @@
*/
public class ChunksDecoder implements MultiDecoder<ChunksData> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public ChunksData decode(List<Object> parts, State state) {
return new ChunksData(((Long) parts.get(0)).intValue(), (byte[]) parts.get(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisbloom.model.CountMinSketchInfo;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;
Expand All @@ -28,11 +27,6 @@
*/
public class CountMinSketchDecoder implements MultiDecoder<CountMinSketchInfo> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public CountMinSketchInfo decode(List<Object> parts, State state) {
return new CountMinSketchInfo(((Long) parts.get(1)).intValue(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisbloom.model.CuckooFilterInfo;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;
Expand All @@ -28,11 +27,6 @@
*/
public class CuckooFilterDecoder implements MultiDecoder<CuckooFilterInfo> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public CuckooFilterInfo decode(List<Object> parts, State state) {
return new CuckooFilterInfo(((Long) parts.get(1)).intValue(), ((Long) parts.get(3)).intValue(), ((Long) parts.get(5)).intValue(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@

import io.github.dengliming.redismodule.redisbloom.model.TDigestInfo;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;

public class TDigestDecoder implements MultiDecoder<TDigestInfo> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public TDigestInfo decode(List<Object> parts, State state) {
return new TDigestInfo((Long) parts.get(1), (Long) parts.get(3), (Long) parts.get(5), (Long) parts.get(7),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisbloom.model.TopKFilterInfo;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.List;
Expand All @@ -28,11 +27,6 @@
*/
public class TopKFilterDecoder implements MultiDecoder<TopKFilterInfo> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public TopKFilterInfo decode(List<Object> parts, State state) {
return new TopKFilterInfo(((Long) parts.get(1)).intValue(), ((Long) parts.get(3)).intValue(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public RediSearchClient(Config config) {
}

public RediSearch getRediSearch(String name) {
return new RediSearch(getConnectionManager().getCommandExecutor(), name);
return new RediSearch(getCommandExecutor(), name);
}

public Void flushall() {
CommandAsyncExecutor commandExecutor = getConnectionManager().getCommandExecutor();
CommandAsyncExecutor commandExecutor = getCommandExecutor();
return commandExecutor.get(commandExecutor.writeAllAsync(RedisCommands.FLUSHALL));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import io.github.dengliming.redismodule.redisearch.aggregate.AggregateResult;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.ArrayList;
Expand All @@ -30,11 +29,6 @@
*/
public class AggregateDecoder implements MultiDecoder<AggregateResult> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public AggregateResult decode(List<Object> parts, State state) {
AggregateResult aggregateResult = new AggregateResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import io.github.dengliming.redismodule.redisearch.search.MisspelledSuggestion;
import io.github.dengliming.redismodule.redisearch.search.MisspelledTerm;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.ArrayList;
Expand All @@ -30,11 +29,6 @@
*/
public class MisspelledTermDecoder implements MultiDecoder<MisspelledTerm> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public MisspelledTerm decode(List<Object> parts, State state) {
if (parts == null || parts.size() < 3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import io.github.dengliming.redismodule.redisearch.index.Document;
import io.github.dengliming.redismodule.redisearch.search.SearchResult;
import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.ArrayList;
Expand All @@ -40,11 +39,6 @@ public SearchResultDecoder(boolean withScores) {
this.withScores = withScores;
}

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public SearchResult decode(List<Object> parts, State state) {
Long total = (Long) parts.get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package io.github.dengliming.redismodule.redisearch.protocol.decoder;

import org.redisson.client.handler.State;
import org.redisson.client.protocol.Decoder;
import org.redisson.client.protocol.decoder.MultiDecoder;

import java.util.LinkedHashMap;
Expand All @@ -29,11 +28,6 @@
*/
public class StringMapInfoDecoder implements MultiDecoder<Map<String, Object>> {

@Override
public Decoder<Object> getDecoder(int paramNum, State state) {
return null;
}

@Override
public Map<String, Object> decode(List<Object> parts, State state) {
Map<String, Object> fields = new LinkedHashMap<>(parts.size() / 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public RedisGearsClient(Config config) {
}

public RedisGears getRedisGears() {
return new RedisGears(getConnectionManager().getCommandExecutor());
return new RedisGears(getCommandExecutor());
}

public Void flushall() {
CommandAsyncExecutor commandExecutor = getConnectionManager().getCommandExecutor();
CommandAsyncExecutor commandExecutor = getCommandExecutor();
return commandExecutor.get(commandExecutor.writeAllAsync(RedisCommands.FLUSHALL));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public RedisJSONClient(Config config) {
}

public RedisJSON getRedisJSON() {
return new RedisJSON(getConnectionManager().getCommandExecutor());
return new RedisJSON(getCommandExecutor());
}

public Void flushall() {
CommandAsyncExecutor commandExecutor = getConnectionManager().getCommandExecutor();
CommandAsyncExecutor commandExecutor = getCommandExecutor();
return commandExecutor.get(commandExecutor.writeAllAsync(RedisCommands.FLUSHALL));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.redisson.client.protocol.RedisCommand;
import org.redisson.client.protocol.convertor.LongReplayConvertor;
import org.redisson.client.protocol.decoder.ObjectDecoder;
import org.redisson.client.protocol.decoder.ObjectListReplayDecoder;
import org.redisson.client.protocol.decoder.StringDataDecoder;
import org.redisson.client.protocol.decoder.StringReplayDecoder;
Expand All @@ -28,18 +29,18 @@
public interface RedisCommands {

RedisCommand JSON_DEL = new RedisCommand<>("JSON.DEL", new LongReplayConvertor());
RedisCommand JSON_SET = new RedisCommand<>("JSON.SET", new StringReplayDecoder());
RedisCommand JSON_GET = new RedisCommand<>("JSON.GET", new StringDataDecoder());
RedisCommand JSON_TYPE = new RedisCommand<>("JSON.TYPE", new StringDataDecoder());
RedisCommand JSON_SET = new RedisCommand<>("JSON.SET", new ObjectDecoder(new StringReplayDecoder()));
RedisCommand JSON_GET = new RedisCommand<>("JSON.GET", new ObjectDecoder(new StringDataDecoder()));
RedisCommand JSON_TYPE = new RedisCommand<>("JSON.TYPE", new ObjectDecoder(new StringDataDecoder()));
RedisCommand JSON_MGET = new RedisCommand<>("JSON.MGET", new ObjectListReplayDecoder<String>());
RedisCommand JSON_NUMINCRBY = new RedisCommand<>("JSON.NUMINCRBY", new StringDataDecoder());
RedisCommand JSON_NUMMULTBY = new RedisCommand<>("JSON.NUMMULTBY", new StringDataDecoder());
RedisCommand JSON_NUMINCRBY = new RedisCommand<>("JSON.NUMINCRBY", new ObjectDecoder(new StringDataDecoder()));
RedisCommand JSON_NUMMULTBY = new RedisCommand<>("JSON.NUMMULTBY", new ObjectDecoder(new StringDataDecoder()));
RedisCommand JSON_STRAPPEND = new RedisCommand<>("JSON.STRAPPEND", new LongReplayConvertor());
RedisCommand JSON_STRLEN = new RedisCommand<>("JSON.STRLEN", new LongReplayConvertor());
RedisCommand JSON_ARRAPPEND = new RedisCommand<>("JSON.ARRAPPEND", new LongReplayConvertor());
RedisCommand JSON_ARRLEN = new RedisCommand<>("JSON.ARRLEN", new LongReplayConvertor());
RedisCommand JSON_ARRTRIM = new RedisCommand<>("JSON.ARRTRIM", new LongReplayConvertor());
RedisCommand JSON_ARRINSERT = new RedisCommand<>("JSON.ARRINSERT", new LongReplayConvertor());
RedisCommand JSON_ARRINDEX = new RedisCommand<>("JSON.ARRINDEX", new LongReplayConvertor());
RedisCommand JSON_ARRPOP = new RedisCommand<>("JSON.ARRPOP", new StringDataDecoder());
RedisCommand JSON_ARRPOP = new RedisCommand<>("JSON.ARRPOP", new ObjectDecoder(new StringDataDecoder()));
}
Loading