本文整理汇总了Java中org.redisson.client.codec.Codec类的典型用法代码示例。如果您正苦于以下问题:Java Codec类的具体用法?Java Codec怎么用?Java Codec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Codec类属于org.redisson.client.codec包,在下文中一共展示了Codec类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: async
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
protected <V, R> void async(boolean readOnlyMode, int slot, MultiDecoder<Object> messageDecoder,
Codec codec, RedisCommand<V> command, Object[] params, Promise<R> mainPromise, int attempt) {
if (executed) {
throw new IllegalStateException("Batch already executed!");
}
Entry entry = commands.get(slot);
if (entry == null) {
entry = new Entry();
Entry oldEntry = commands.putIfAbsent(slot, entry);
if (oldEntry != null) {
entry = oldEntry;
}
}
if (!readOnlyMode) {
entry.setReadOnlyMode(false);
}
entry.getCommands().add(new CommandEntry(new CommandData<V, R>(mainPromise, messageDecoder, codec, command, params), index.incrementAndGet()));
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:21,代码来源:CommandBatchExecutorService.java
示例2: CommandData
import org.redisson.client.codec.Codec; //导入依赖的package包/类
public CommandData(Promise<R> promise, MultiDecoder<Object> messageDecoder, Codec codec, RedisCommand<T> command, Object[] params) {
this.promise = promise;
this.command = command;
this.params = params;
this.codec = codec;
this.messageDecoder = messageDecoder;
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:8,代码来源:CommandData.java
示例3: evalAsync
import org.redisson.client.codec.Codec; //导入依赖的package包/类
private <T, R> Future<R> evalAsync(boolean readOnlyMode, String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object ... params) {
Promise<R> mainPromise = connectionManager.newPromise();
List<Object> args = new ArrayList<Object>(2 + keys.size() + params.length);
args.add(script);
args.add(keys.size());
args.addAll(keys);
args.addAll(Arrays.asList(params));
int slot = connectionManager.calcSlot(key);
async(readOnlyMode, slot, null, codec, evalCommandType, args.toArray(), mainPromise, 0);
return mainPromise;
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:12,代码来源:CommandExecutorService.java
示例4: loadComparator
import org.redisson.client.codec.Codec; //导入依赖的package包/类
private void loadComparator() {
commandExecutor.read(getName(), new SyncOperation<Void>() {
@Override
public Void execute(Codec codec, RedisConnection conn) {
loadComparator(conn);
return null;
}
});
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:10,代码来源:RedissonSortedSet.java
示例5: contains
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public boolean contains(final Object o) {
return commandExecutor.read(getName(), new SyncOperation<Boolean>() {
@Override
public Boolean execute(Codec codec, RedisConnection conn) {
return binarySearch((V)o, codec, conn).getIndex() >= 0;
}
});
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:10,代码来源:RedissonSortedSet.java
示例6: remove
import org.redisson.client.codec.Codec; //导入依赖的package包/类
private void remove(final int index) {
commandExecutor.write(getName(), new SyncOperation<V>() {
@Override
public V execute(Codec codec, RedisConnection conn) {
if (index == 0) {
return conn.sync(codec, RedisCommands.LPOP, getName());
}
while (true) {
conn.sync(RedisCommands.WATCH, getName());
List<Object> tail = conn.sync(codec, RedisCommands.LRANGE, getName(), index + 1, size());
conn.sync(RedisCommands.MULTI);
conn.sync(codec, RedisCommands.LTRIM, getName(), 0, index - 1);
if (tail.isEmpty()) {
if (((List<Object>)conn.sync(codec, RedisCommands.EXEC)).size() == 1) {
return null;
}
} else {
tail.add(0, getName());
conn.sync(codec, RedisCommands.RPUSH, tail.toArray());
if (((List<Object>)conn.sync(codec, RedisCommands.EXEC)).size() == 2) {
return null;
}
}
}
}
});
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:28,代码来源:RedissonSortedSet.java
示例7: add
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public boolean add(final V value) {
return commandExecutor.write(getName(), new SyncOperation<Boolean>() {
@Override
public Boolean execute(Codec codec, RedisConnection conn) {
return add(value, codec, conn);
}
});
}
开发者ID:rollenholt-SourceReading,项目名称:redisson,代码行数:10,代码来源:RedissonSortedSet.java
示例8: getGeo
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <V> RGeo<V> getGeo(String name, Codec codec) {
return r.getGeo(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例9: getSetCache
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <V> RSetCache<V> getSetCache(String name, Codec codec) {
return r.getSetCache(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例10: getMapCache
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RMapCache<K, V> getMapCache(String name, Codec codec) {
return r.getMapCache(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例11: getBucket
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <V> RBucket<V> getBucket(String name, Codec codec) {
return r.getBucket(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例12: getBuckets
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public RBuckets getBuckets(Codec codec) {
return r.getBuckets(codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例13: getHyperLogLog
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <V> RHyperLogLog<V> getHyperLogLog(String name, Codec codec) {
return r.getHyperLogLog(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例14: getList
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <V> RList<V> getList(String name, Codec codec) {
return r.getList(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例15: getListMultimap
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RListMultimap<K, V> getListMultimap(String name, Codec codec) {
return r.getListMultimap(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例16: getListMultimapCache
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RListMultimapCache<K, V> getListMultimapCache(String name, Codec codec) {
return r.getListMultimapCache(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例17: getLocalCachedMap
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RLocalCachedMap<K, V> getLocalCachedMap(String name, Codec codec, LocalCachedMapOptions<K, V> options) {
return r.getLocalCachedMap(name, codec, options);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例18: getMap
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RMap<K, V> getMap(String name, Codec codec) {
return r.getMap(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例19: getSetMultimap
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RSetMultimap<K, V> getSetMultimap(String name, Codec codec) {
return r.getSetMultimap(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
示例20: getSetMultimapCache
import org.redisson.client.codec.Codec; //导入依赖的package包/类
@Override
public <K, V> RSetMultimapCache<K, V> getSetMultimapCache(String name, Codec codec) {
return r.getSetMultimapCache(name, codec);
}
开发者ID:JungleTree,项目名称:JungleTree,代码行数:5,代码来源:JungleRedissonClient.java
注:本文中的org.redisson.client.codec.Codec类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论