org.hibernate.shards.strategy.access
Class ParallelShardAccessStrategy

java.lang.Object
  extended by org.hibernate.shards.strategy.access.ParallelShardAccessStrategy
All Implemented Interfaces:
ShardAccessStrategy

public class ParallelShardAccessStrategy
extends Object
implements ShardAccessStrategy

Invokes the given operation on the given shards in parallel. TODO(maxr) Add support for rejected tasks

Author:
maxr@google.com (Max Ross)

Constructor Summary
ParallelShardAccessStrategy(java.util.concurrent.ThreadPoolExecutor executor)
           
 
Method Summary
<T> T
apply(List<Shard> shards, ShardOperation<T> operation, ExitStrategy<T> exitStrategy, ExitOperationsCollector exitOperationsCollector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParallelShardAccessStrategy

public ParallelShardAccessStrategy(java.util.concurrent.ThreadPoolExecutor executor)
Method Detail

apply

public <T> T apply(List<Shard> shards,
                   ShardOperation<T> operation,
                   ExitStrategy<T> exitStrategy,
                   ExitOperationsCollector exitOperationsCollector)
Specified by:
apply in interface ShardAccessStrategy