uk.org.simonsite.log4j.appender
Interface LoggingTaskExecutorService

All Known Implementing Classes:
NamedLoggingTaskExecutorService, PooledLoggingTaskExecutorService, SimpleLoggingTaskExecutorService

public interface LoggingTaskExecutorService

An object that executes submitted logging tasks that provides methods to manage termination and methods that can produce a Cancellable for cancellation of one asynchronous task.

A LoggingTaskExecutorService can be shut down, which will cause it to reject new tasks. The shutdownNow() method prevents waiting tasks from starting and attempts to stop currently executing tasks. Upon termination, a service has no tasks actively executing, no tasks awaiting execution, and no new tasks can be submitted.

This documentation has been shamelessly plagiarised from Doug Lea's excellent concurrency library.

Version:
1.1
Author:
Simon Park

Method Summary
 void activateOptions()
          Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.
 Object scheduleAtFixedRate(Runnable command, long initialDelay, long delay)
           
 void setAppender(Appender appender)
           
 void setErrorHandler(ErrorHandler eh)
           
 void setThreadFactory(ThreadFactory tf)
           
 List shutdownNow()
          Signal the scheduler thread to shutdown in an orderly manner and then clears any waiting tasks.
 Object submit(Runnable task)
           
 

Method Detail

setAppender

void setAppender(Appender appender)

setErrorHandler

void setErrorHandler(ErrorHandler eh)

setThreadFactory

void setThreadFactory(ThreadFactory tf)

activateOptions

void activateOptions()
Initialise the implementation with a ErrorHandler and a ThreadFactory, and start the scheduler thread.


shutdownNow

List shutdownNow()
Signal the scheduler thread to shutdown in an orderly manner and then clears any waiting tasks.

Returns:
an empty list.

scheduleAtFixedRate

Object scheduleAtFixedRate(Runnable command,
                           long initialDelay,
                           long delay)
Parameters:
command -
initialDelay -
delay -
Returns:
a Cancellable object.

submit

Object submit(Runnable task)
Parameters:
task -
Returns:
a Cancellable object.