use of org.redisson.misc.CompositeIterable in project redisson by redisson.
the class RedissonKeys method getKeysByPattern.
public Iterable<String> getKeysByPattern(final String pattern, final int count) {
List<Iterable<String>> iterables = new ArrayList<Iterable<String>>();
for (final MasterSlaveEntry entry : commandExecutor.getConnectionManager().getEntrySet()) {
Iterable<String> iterable = new Iterable<String>() {
@Override
public Iterator<String> iterator() {
return createKeysIterator(entry, pattern, count);
}
};
iterables.add(iterable);
}
return new CompositeIterable<String>(iterables);
}
Aggregations