public long getTTL(int id, int db, String key) {
if(!isKeyExist(id, db, key))
throw new KeyNotExistException(id, db, key);
TTLs command = new TTLs(id, db, key);
command.execute();
long ttl = command.getSecond();
if(ttl == -2)
throw new KeyNotExistException(id, db, key);
return ttl;