package com.cxy.redisclient.integration.key; import com.cxy.redisclient.domain.RedisVersion; import com.cxy.redisclient.integration.JedisCommand; public class GetSize extends JedisCommand { private int db; private String key; private long size; public GetSize(int id, int db, String key) { super(id); this.db = db; this.key = key; } @Override protected void command() { jedis.select(db); size = getSize(key); } public long getSize() { return size; } @Override public RedisVersion getSupportVersion() { return RedisVersion.REDIS_1_0; } }