org.eclipse.net4j.util.concurrent
Class AsynchronousWorkSerializer

java.lang.Object
  extended by org.eclipse.net4j.util.concurrent.AsynchronousWorkSerializer
All Implemented Interfaces:
Runnable, IWorkSerializer

public class AsynchronousWorkSerializer
extends Object
implements IWorkSerializer, Runnable


Constructor Summary
AsynchronousWorkSerializer(ExecutorService executorService)
           
AsynchronousWorkSerializer(ExecutorService executorService, Queue<Runnable> workQueue)
           
 
Method Summary
 boolean addWork(Runnable work)
           
 void dispose()
           
 ExecutorService getExecutorService()
           
 void run()
          Executed in the context of the executor service.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsynchronousWorkSerializer

public AsynchronousWorkSerializer(ExecutorService executorService,
                                  Queue<Runnable> workQueue)

AsynchronousWorkSerializer

public AsynchronousWorkSerializer(ExecutorService executorService)
Method Detail

getExecutorService

public ExecutorService getExecutorService()

addWork

public boolean addWork(Runnable work)
Specified by:
addWork in interface IWorkSerializer

run

public void run()
Executed in the context of the executor service.

Specified by:
run in interface Runnable

dispose

public void dispose()
Specified by:
dispose in interface IWorkSerializer

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.