示例#1
0
 private boolean set(final String key, final Object value) {
   RedisConnection<String, String> redis = ChunkControl.getPlugin().redis();
   return redis.hset(
       String.format("chunk:%s:%d", key, chunk.getX()),
       String.format("%d", chunk.getZ()),
       String.valueOf(value));
 }
示例#2
0
 private double add(final String key, final double value) {
   RedisConnection<String, String> redis = ChunkControl.getPlugin().redis();
   return redis.hincrbyfloat(
       String.format("chunk:%s:%d", key, chunk.getX()), String.format("%d", chunk.getZ()), value);
 }
示例#3
0
 private String get(final String key) {
   RedisConnection<String, String> redis = ChunkControl.getPlugin().redis();
   return redis.hget(
       String.format("chunk:%s:%d", key, chunk.getX()), String.format("%d", chunk.getZ()));
 }