public class AsynchronousWorkSerializer extends Object implements IWorkSerializer, Runnable
Constructor and Description |
---|
AsynchronousWorkSerializer(ExecutorService executorService) |
AsynchronousWorkSerializer(ExecutorService executorService,
Queue<Runnable> workQueue) |
Modifier and Type | Method and Description |
---|---|
boolean |
addWork(Runnable work) |
void |
dispose() |
ExecutorService |
getExecutorService() |
void |
run()
Executed in the context of the
executor service . |
String |
toString() |
public AsynchronousWorkSerializer(ExecutorService executorService, Queue<Runnable> workQueue)
public AsynchronousWorkSerializer(ExecutorService executorService)
public ExecutorService getExecutorService()
public boolean addWork(Runnable work)
addWork
in interface IWorkSerializer
public void run()
executor service
.
public void dispose()
dispose
in interface IWorkSerializer
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.