@Test public void dropSet() { List<String> members = new ArrayList<String>(); members.add("setMember_1"); members.add("setMember_2"); SetCacheManager.createSet("domain", "set_94", members); List<String> berforeMemberList = SetCacheManager.getSetMembers("domain", "set_94"); Assert.assertEquals("setMember_1", berforeMemberList.get(0)); SetCacheManager.dropSet("domain", "set_94"); List<String> afterMemberList = SetCacheManager.getSetMembers("domain", "set_94"); Assert.assertTrue(afterMemberList.isEmpty()); }
public static void dropSet(String graphId, String setId) { validateRequired(graphId, setId, GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { jedis.del(key); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name(), e.getMessage()); } finally { returnConnection(jedis); } }
SetCacheManager { public static void dropSet(String graphId, String setId) { validateRequired(graphId, setId, GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { jedis.del(key); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name(), e.getMessage()); } finally { returnConnection(jedis); } } }
SetCacheManager { public static void dropSet(String graphId, String setId) { validateRequired(graphId, setId, GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { jedis.del(key); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name(), e.getMessage()); } finally { returnConnection(jedis); } }  }
SetCacheManager { public static void dropSet(String graphId, String setId) { validateRequired(graphId, setId, GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { jedis.del(key); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name(), e.getMessage()); } finally { returnConnection(jedis); } }  static void createSet(String graphId, String setId, List<String> members); static void addSetMember(String graphId, String setId, String memberId); static void addSetMembers(String graphId, String setId, List<String> memberIds); static void removeSetMember(String graphId, String setId, String memberId); static void dropSet(String graphId, String setId); static List<String> getSetMembers(String graphId, String setId); static Long getSetCardinality(String graphId, String setId); static Boolean isSetMember(String graphId, String setId, String member); }
SetCacheManager { public static void dropSet(String graphId, String setId) { validateRequired(graphId, setId, GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name()); Jedis jedis = getRedisConncetion(); String key = CacheKeyGenerator.getSetMembersKey(graphId, setId); try { jedis.del(key); } catch (Exception e) { throw new ServerException(GraphCacheErrorCodes.ERR_CACHE_DROP_SET.name(), e.getMessage()); } finally { returnConnection(jedis); } }  static void createSet(String graphId, String setId, List<String> members); static void addSetMember(String graphId, String setId, String memberId); static void addSetMembers(String graphId, String setId, List<String> memberIds); static void removeSetMember(String graphId, String setId, String memberId); static void dropSet(String graphId, String setId); static List<String> getSetMembers(String graphId, String setId); static Long getSetCardinality(String graphId, String setId); static Boolean isSetMember(String graphId, String setId, String member);  }