org.compass.core.executor.workmanager
Class WorkManagerExecutorManager

java.lang.Object
  extended by org.compass.core.executor.workmanager.WorkManagerExecutorManager
All Implemented Interfaces:
CompassConfigurable, InternalExecutorManager

public class WorkManagerExecutorManager
extends Object
implements InternalExecutorManager, CompassConfigurable

Author:
kimchy

Constructor Summary
WorkManagerExecutorManager()
           
 
Method Summary
 void close()
          Shuts down this executor manager.
 void configure(CompassSettings settings)
          Configure using the given settings.
<T> List<Future<T>>
invokeAll(Collection<Callable<T>> tasks)
           
<V> ScheduledFuture<V>
schedule(Callable<V> callable, long delay, TimeUnit unit)
           
 ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
           
 ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
           
<T> Future<T>
submit(Callable<T> task)
           
 void submit(Runnable task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkManagerExecutorManager

public WorkManagerExecutorManager()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

submit

public void submit(Runnable task)
Specified by:
submit in interface InternalExecutorManager

submit

public <T> Future<T> submit(Callable<T> task)
Specified by:
submit in interface InternalExecutorManager
See Also:
ExecutorService.submit(java.util.concurrent.Callable)

invokeAll

public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
                          throws InterruptedException
Specified by:
invokeAll in interface InternalExecutorManager
Throws:
InterruptedException
See Also:
ExecutorService.invokeAll(java.util.Collection)

schedule

public <V> ScheduledFuture<V> schedule(Callable<V> callable,
                                       long delay,
                                       TimeUnit unit)
Specified by:
schedule in interface InternalExecutorManager
See Also:
ScheduledExecutorService.schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)

scheduleAtFixedRate

public ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
                                              long initialDelay,
                                              long period,
                                              TimeUnit unit)
Specified by:
scheduleAtFixedRate in interface InternalExecutorManager
See Also:
ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, java.util.concurrent.TimeUnit)

scheduleWithFixedDelay

public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
                                                 long initialDelay,
                                                 long delay,
                                                 TimeUnit unit)
Specified by:
scheduleWithFixedDelay in interface InternalExecutorManager
See Also:
ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit)

close

public void close()
Description copied from interface: InternalExecutorManager
Shuts down this executor manager.

Specified by:
close in interface InternalExecutorManager


Copyright (c) 2004-2008 The Compass Project.