Search in sources :

Example 1 with BoundListOperations

use of org.springframework.data.redis.core.BoundListOperations in project roof-im by madfroglx.

the class RedisBlockingQueueLoadBalanceMessagePublisher method createQueues.

@Override
protected List<BlockingQueue> createQueues(String serverName) {
    List<BlockingQueue> list = new ArrayList<>();
    for (RedisTemplate redisTemplate : redisTemplates) {
        BoundListOperations boundListOperations = redisTemplate.boundListOps(serverName);
        BlockingQueue blockingQueue = new DefaultRedisList(boundListOperations);
        list.add(blockingQueue);
    }
    return list;
}
Also used : BlockingQueue(java.util.concurrent.BlockingQueue) BoundListOperations(org.springframework.data.redis.core.BoundListOperations) RedisTemplate(org.springframework.data.redis.core.RedisTemplate) DefaultRedisList(org.springframework.data.redis.support.collections.DefaultRedisList) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 BlockingQueue (java.util.concurrent.BlockingQueue)1 BoundListOperations (org.springframework.data.redis.core.BoundListOperations)1 RedisTemplate (org.springframework.data.redis.core.RedisTemplate)1 DefaultRedisList (org.springframework.data.redis.support.collections.DefaultRedisList)1