Package org.redisson.executor
Class RedissonCompletionService<V>
java.lang.Object
org.redisson.executor.RedissonCompletionService<V>
- Type Parameters:
V
- value type
- All Implemented Interfaces:
CompletionService<V>
A
CompletionService
that uses a supplied Executor
to execute tasks. This class arranges that submitted tasks are,
upon completion, placed on a queue accessible using take
.
The class is lightweight enough to be suitable for transient use
when processing groups of tasks.- Author:
- Nikita Koksharov
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BlockingQueue<RFuture<V>>
protected final RScheduledExecutorService
-
Constructor Summary
ConstructorDescriptionRedissonCompletionService
(RScheduledExecutorService executorService) RedissonCompletionService
(RScheduledExecutorService executorService, BlockingQueue<RFuture<V>> completionQueue) -
Method Summary
-
Field Details
-
executorService
-
completionQueue
-
-
Constructor Details
-
RedissonCompletionService
-
RedissonCompletionService
public RedissonCompletionService(RScheduledExecutorService executorService, BlockingQueue<RFuture<V>> completionQueue)
-
-
Method Details
-
submit
- Specified by:
submit
in interfaceCompletionService<V>
-
submit
- Specified by:
submit
in interfaceCompletionService<V>
-
take
- Specified by:
take
in interfaceCompletionService<V>
- Throws:
InterruptedException
-
poll
- Specified by:
poll
in interfaceCompletionService<V>
-
poll
- Specified by:
poll
in interfaceCompletionService<V>
- Throws:
InterruptedException
-