@Test public void getChannelIds() throws ChannelNotFoundException { final RedisDataStore store = newRedisDataStore(); final String uaid = UUIDUtil.newUAID(); store.saveChannel(newChannel2(uaid)); store.saveChannel(newChannel2(uaid)); final Set<String> channelIds = store.getChannelIds(uaid); assertThat(channelIds.size(), is(2)); }
@Override public Set<String> getChannelIds(final String uaid) { final Jedis jedis = jedisPool.getResource(); try { return jedis.smembers(uaidLookupKey(uaid)); } finally { jedisPool.returnResource(jedis); } }
RedisDataStore implements DataStore { @Override public Set<String> getChannelIds(final String uaid) { final Jedis jedis = jedisPool.getResource(); try { return jedis.smembers(uaidLookupKey(uaid)); } finally { jedisPool.returnResource(jedis); } } }
RedisDataStore implements DataStore { @Override public Set<String> getChannelIds(final String uaid) { final Jedis jedis = jedisPool.getResource(); try { return jedis.smembers(uaidLookupKey(uaid)); } finally { jedisPool.returnResource(jedis); } } RedisDataStore(final String host, final int port); }
RedisDataStore implements DataStore { @Override public Set<String> getChannelIds(final String uaid) { final Jedis jedis = jedisPool.getResource(); try { return jedis.smembers(uaidLookupKey(uaid)); } finally { jedisPool.returnResource(jedis); } } RedisDataStore(final String host, final int port); @Override void savePrivateKeySalt(final byte[] salt); @Override byte[] getPrivateKeySalt(); @Override boolean saveChannel(final Channel channel); @Override void removeChannels(final Set<String> channelIds); @Override Channel getChannel(final String channelId); @Override Set<String> getChannelIds(final String uaid); @Override void removeChannels(final String uaid); @Override String updateVersion(final String endpointToken, final long newVersion); @Override String saveUnacknowledged(final String channelId, final long version); @Override Set<Ack> getUnacknowledged(final String uaid); @Override Set<Ack> removeAcknowledged(final String uaid, final Set<Ack> acks); }
RedisDataStore implements DataStore { @Override public Set<String> getChannelIds(final String uaid) { final Jedis jedis = jedisPool.getResource(); try { return jedis.smembers(uaidLookupKey(uaid)); } finally { jedisPool.returnResource(jedis); } } RedisDataStore(final String host, final int port); @Override void savePrivateKeySalt(final byte[] salt); @Override byte[] getPrivateKeySalt(); @Override boolean saveChannel(final Channel channel); @Override void removeChannels(final Set<String> channelIds); @Override Channel getChannel(final String channelId); @Override Set<String> getChannelIds(final String uaid); @Override void removeChannels(final String uaid); @Override String updateVersion(final String endpointToken, final long newVersion); @Override String saveUnacknowledged(final String channelId, final long version); @Override Set<Ack> getUnacknowledged(final String uaid); @Override Set<Ack> removeAcknowledged(final String uaid, final Set<Ack> acks);  }