public class UnitOfWorkExecutorStrategy extends Object implements UnitOfWorkSpawnStrategy
Executors.newFixedThreadPool(int)
ExecutorService
to spawn threads.
This is the default spawn strategy.Constructor and Description |
---|
UnitOfWorkExecutorStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
complete(UnitOfWork unitOfWork,
int duration,
TimeUnit unit) |
boolean |
isCompleted(UnitOfWork unitOfWork) |
List<Future<Throwable>> |
start(UnitOfWork unitOfWork,
int maxConcurrentThreads,
Collection<Callable<Throwable>> values) |
public UnitOfWorkExecutorStrategy()
public List<Future<Throwable>> start(UnitOfWork unitOfWork, int maxConcurrentThreads, Collection<Callable<Throwable>> values) throws InterruptedException
start
in interface UnitOfWorkSpawnStrategy
InterruptedException
public boolean isCompleted(UnitOfWork unitOfWork)
isCompleted
in interface UnitOfWorkSpawnStrategy
public void complete(UnitOfWork unitOfWork, int duration, TimeUnit unit) throws InterruptedException
complete
in interface UnitOfWorkSpawnStrategy
InterruptedException
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.