jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.concurrent
Interface BppManagerMBean

All Known Implementing Classes:
BppManager

public interface BppManagerMBean

MBean for managing batched paged processor.

Author:
Gabor Imre

Method Summary
 void freeze()
          Freeze worker.
 String[] getFirstPageSources()
          Inputs represented by the first enqueued page in String format.
 long getInputCount()
          Number of individual inputs read from the input source.
 int getMaxQueueSize()
          Current results queue size limit.
 int getNonFinishedCount()
          Non finished items in the queue.
 long getOutputCount()
          Number of reported results.
 int getPageSize()
          Current page size.
 int getQueueSize()
          Current size of the results queue.
 boolean isFrozen()
          Check frozen status.
 void killAllAndFreeze()
          Kill first page and freeze worker.
 void killFirstPage()
          Kill first page unconditionally.
 void killFirstPageIfBlocking()
          Kill first page only if all other pages are ready.
 void setMaxQueueSize(int queueSize)
          Set new max queue size parameter.
 void setPageSize(int size)
          Set new page size.
 void unfreeze()
          Unfreeze worker.
 

Method Detail

getMaxQueueSize

int getMaxQueueSize()
Current results queue size limit.

Returns:
Current queue size limit.

setMaxQueueSize

void setMaxQueueSize(int queueSize)
Set new max queue size parameter.

Parameters:
queueSize - New queue size

getQueueSize

int getQueueSize()
Current size of the results queue.

Returns:
Current results queue size

getNonFinishedCount

int getNonFinishedCount()
Non finished items in the queue.

Returns:
Non finished items in the queue

getPageSize

int getPageSize()
Current page size.

Number of input items bundled into one page which is one execution unit.

Returns:
current page size

setPageSize

void setPageSize(int size)
Set new page size.

Note that new page size will be effective upon next enqueue operation. Pages in the results queue are not affected.

Parameters:
size - New page size.

getInputCount

long getInputCount()
Number of individual inputs read from the input source.

This is the sum of ready and reported, ready and not reported and enqueued inputs.

Returns:
Read input count

getOutputCount

long getOutputCount()
Number of reported results.

Returns:
Number of reported results

getFirstPageSources

String[] getFirstPageSources()
Inputs represented by the first enqueued page in String format.

More precisely the page in the head of the results queue. This page might be ready and waiting for reporting, in progress or wait for execution.

Returns:
Inputs represented by the first page

killFirstPageIfBlocking

void killFirstPageIfBlocking()
Kill first page only if all other pages are ready.

All the inputs will be reported as failures. If the first page was not blocking an exception is thrown.

Throws:
IllegalStateException - If the first page is done (see Future.isDone() or at least one page in the queue is not done.

killFirstPage

void killFirstPage()
Kill first page unconditionally.

If the first page is ready and waiting for reporting the results will be overriden with failure.


killAllAndFreeze

void killAllAndFreeze()
Kill first page and freeze worker.


isFrozen

boolean isFrozen()
Check frozen status.

Returns:
true if executor is frozen

freeze

void freeze()
Freeze worker.

Note that frozen status implies that worker will prefer blocking when queue size limits otherwise would allow new task submission. New task submission is however possibly accepted in frozen status.

If the worker is already frozen do nothing.


unfreeze

void unfreeze()
Unfreeze worker.

If the worker is not frozen do nothing.


jklustor-overlap-0.0.2-20140619012940 (ChemAxon)