String serlen = tokens.get(7).substring("serializedlength:".length()); ObjectInfo info = new ObjectInfo( keyAddr, Integer.parseInt(keyCnt),
private final ObjectInfo getObjectInfo(ValueResponse resp){ String stringValue = resp.getStringValue(); return ObjectInfo.valueOf(stringValue); } public ObjectInfo get () throws InterruptedException, ExecutionException {
private final ObjectInfo getObjectInfo(ValueResponse resp){ String stringValue = resp.getStringValue(); return ObjectInfo.valueOf(stringValue); } public ObjectInfo get () throws InterruptedException, ExecutionException {
"lru_seconds_idle:".length()); ObjectInfo info = new ObjectInfo(keyAddr, Integer.parseInt(keyCnt), ObjectEncoding.valueOf(encodingRep.toUpperCase()), Integer.parseInt(serlen), Integer.parseInt(lru),
private final ObjectInfo getObjectInfo(ValueResponse resp){ String stringValue = resp.getStringValue(); return ObjectInfo.valueOf(stringValue); } public ObjectInfo get () throws InterruptedException, ExecutionException {
"lru_seconds_idle:".length()); ObjectInfo info = new ObjectInfo(keyAddr, Integer.parseInt(keyCnt), ObjectEncoding.valueOf(encodingRep.toUpperCase()), Integer.parseInt(serlen), Integer.parseInt(lru),
public ObjectInfo debug (String key) throws RedisException { byte[] keybytes = getKeyBytes(key); if(key.length() == 0) throw new IllegalArgumentException ("invalid zero length key => ["+key+"]"); ObjectInfo objectInfo = null; /* ValueRespose */ try { ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.DEBUG, "OBJECT".getBytes(), keybytes); String stringValue = valResponse.getStringValue(); objectInfo = ObjectInfo.valueOf(stringValue); } catch (ClassCastException e){ throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e); } return objectInfo; } /* ------------------------------- commands returning Maps --------- */
@Override public <K extends Object> ObjectInfo debug (K key) throws RedisException { byte[] keybytes = getKeyBytes(key); // if(key.length() == 0) // throw new IllegalArgumentException ("invalid zero length key => ["+key+"]"); ObjectInfo objectInfo = null; /* ValueRespose */ try { ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.DEBUG, "OBJECT".getBytes(), keybytes); String stringValue = valResponse.getStringValue(); objectInfo = ObjectInfo.valueOf(stringValue); } catch (ClassCastException e){ throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e); } return objectInfo; } /* ------------------------------- commands returning Maps --------- */
@Override public <K extends Object> ObjectInfo debug (K key) throws RedisException { byte[] keybytes = getKeyBytes(key); // if(key.length() == 0) // throw new IllegalArgumentException ("invalid zero length key => ["+key+"]"); ObjectInfo objectInfo = null; /* ValueRespose */ try { ValueResponse valResponse = (ValueResponse) this.serviceRequest(Command.DEBUG, "OBJECT".getBytes(), keybytes); String stringValue = valResponse.getStringValue(); objectInfo = ObjectInfo.valueOf(stringValue); } catch (ClassCastException e){ throw new ProviderException("Expecting a ValueResponse here => " + e.getLocalizedMessage(), e); } return objectInfo; } /* ------------------------------- commands returning Maps --------- */