org.apache.jetspeed.aggregator
Interface WorkerMonitor


public interface WorkerMonitor

The Worker Monitor is a thread manager and monitor for async portlet aggregation and rendering.

Version:
$Id: $
Author:
David Sean Taylor

Method Summary
 int getAvailableJobsCount()
          Returns a snapshot count of the available jobs
 int getQueuedJobsCount()
          Retrieves a snapshot of job count in the waiting (backlogged) queue
 int getRunningJobsCount()
          Returns a snapshot count of the jobs currently running
 void process(RenderingJob job)
          Start processing a job, assign it to a worker thread.
 void start()
          Start processing the worker monitor
 void stop()
          Stop processing the worker monitor Finish all jobs
 void waitForRenderingJobs(List renderingJobs)
          Wait for all rendering jobs in the collection to finish successfully or otherwise.
 

Method Detail

start

void start()
Start processing the worker monitor


stop

void stop()
Stop processing the worker monitor Finish all jobs


getQueuedJobsCount

int getQueuedJobsCount()
Retrieves a snapshot of job count in the waiting (backlogged) queue

Returns:
snapshot count of waiting jobs

getAvailableJobsCount

int getAvailableJobsCount()
Returns a snapshot count of the available jobs

Returns:
available jobs count

getRunningJobsCount

int getRunningJobsCount()
Returns a snapshot count of the jobs currently running

Returns:
snapshot count of running jobs

process

void process(RenderingJob job)
Start processing a job, assign it to a worker thread.

Parameters:
job -

waitForRenderingJobs

void waitForRenderingJobs(List renderingJobs)
Wait for all rendering jobs in the collection to finish successfully or otherwise.

Parameters:
renderingJobs - the Collection of rendering job objects to wait for.


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.