@Test public void testIsExisted() { Jedis jedis = pool.getResource(); jedis.auth(password); try { ManagerExpiredHash managerExpiredHash = new ManagerExpiredHash(jedis, KEY_NAME, EXPIRE, MAX_SPAN_TIME); managerExpiredHash.addFields(FIELDS); for (String field : FIELDS) { assertTrue(managerExpiredHash.isExisted(field)); } jedis.del(KEY_NAME); } finally { pool.returnResource(jedis); } }
@Override public boolean isExisted(String field) { return jedis.hexists(keyName, field); }
ManagerExpiredHash implements ManagerHash { @Override public boolean isExisted(String field) { return jedis.hexists(keyName, field); } }
ManagerExpiredHash implements ManagerHash { @Override public boolean isExisted(String field) { return jedis.hexists(keyName, field); } ManagerExpiredHash(Jedis jedis, String keyName, long expire, long maxSpanTime); }
ManagerExpiredHash implements ManagerHash { @Override public boolean isExisted(String field) { return jedis.hexists(keyName, field); } ManagerExpiredHash(Jedis jedis, String keyName, long expire, long maxSpanTime); @Override void addField(String field); @Override void addFields(String... fields); @Override List<String> getFields(); @Override boolean isExisted(String field); @Override void delFields(); }
ManagerExpiredHash implements ManagerHash { @Override public boolean isExisted(String field) { return jedis.hexists(keyName, field); } ManagerExpiredHash(Jedis jedis, String keyName, long expire, long maxSpanTime); @Override void addField(String field); @Override void addFields(String... fields); @Override List<String> getFields(); @Override boolean isExisted(String field); @Override void delFields();  }