cascading.management
Class UnitOfWorkExecutorStrategy

java.lang.Object
  extended by cascading.management.UnitOfWorkExecutorStrategy
All Implemented Interfaces:
UnitOfWorkSpawnStrategy

public class UnitOfWorkExecutorStrategy
extends Object
implements UnitOfWorkSpawnStrategy

Class UnitOfWorkExecutorStrategy uses a simple Executors.newFixedThreadPool(int) ExecutorService to spawn threads.

This is the default spawn strategy.


Constructor Summary
UnitOfWorkExecutorStrategy()
           
 
Method Summary
 void complete(UnitOfWork unitOfWork, int duration, TimeUnit unit)
           
 boolean isCompleted(UnitOfWork unitOfWork)
           
 List<Future<Throwable>> start(UnitOfWork unitOfWork, int maxConcurrentThreads, Collection<Callable<Throwable>> values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitOfWorkExecutorStrategy

public UnitOfWorkExecutorStrategy()
Method Detail

start

public List<Future<Throwable>> start(UnitOfWork unitOfWork,
                                     int maxConcurrentThreads,
                                     Collection<Callable<Throwable>> values)
                              throws InterruptedException
Specified by:
start in interface UnitOfWorkSpawnStrategy
Throws:
InterruptedException

isCompleted

public boolean isCompleted(UnitOfWork unitOfWork)
Specified by:
isCompleted in interface UnitOfWorkSpawnStrategy

complete

public void complete(UnitOfWork unitOfWork,
                     int duration,
                     TimeUnit unit)
              throws InterruptedException
Specified by:
complete in interface UnitOfWorkSpawnStrategy
Throws:
InterruptedException


Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.