intarsys runtime library

de.intarsys.tools.concurrent
Class SynchronousQueuedExecutorService

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by de.intarsys.tools.concurrent.SynchronousQueuedExecutorService
All Implemented Interfaces:
Executor, ExecutorService

public class SynchronousQueuedExecutorService
extends AbstractExecutorService

An ExecutorService that enqueues all commmands.

The commands are performed synchronously upon calling "drain".


Constructor Summary
SynchronousQueuedExecutorService()
           
 
Method Summary
 boolean awaitTermination(long timeout, TimeUnit unit)
           
 void drain()
           
 void execute(Runnable command)
           
 boolean isShutdown()
           
 boolean isTerminated()
           
 void shutdown()
           
 List shutdownNow()
           
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronousQueuedExecutorService

public SynchronousQueuedExecutorService()
Method Detail

awaitTermination

public boolean awaitTermination(long timeout,
                                TimeUnit unit)
                         throws InterruptedException
Throws:
InterruptedException

drain

public void drain()

execute

public void execute(Runnable command)

isShutdown

public boolean isShutdown()

isTerminated

public boolean isTerminated()

shutdown

public void shutdown()

shutdownNow

public List shutdownNow()

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.