org.eclipse.net4j.util.concurrent
Class AsynchronousWorkSerializer

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

public class AsynchronousWorkSerializer
extends java.lang.Object
implements IWorkSerializer, java.lang.Runnable


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

Constructor Detail

AsynchronousWorkSerializer

public AsynchronousWorkSerializer(java.util.concurrent.ExecutorService executorService,
                                  java.util.Queue<java.lang.Runnable> workQueue)

AsynchronousWorkSerializer

public AsynchronousWorkSerializer(java.util.concurrent.ExecutorService executorService)
Method Detail

getExecutorService

public java.util.concurrent.ExecutorService getExecutorService()

addWork

public boolean addWork(java.lang.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 java.lang.Runnable

dispose

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright (c) 2004 - 2008 Eike Stepper, Germany.
All Rights Reserved.