jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.concurrent
Class BppManager

Object
  extended by com.chemaxon.overlap.concurrent.BppManager
All Implemented Interfaces:
BppManagerMBean

 class BppManager
extends Object
implements BppManagerMBean

Management bean implementation.

This class implements operations defined in BppManager interface. Some atomic operations are implemented using multiple operations on ManagedBpp. To ensure atomicity this class synchronizes on the exposed instance.

Author:
Gabor Imre

Constructor Summary
BppManager(ManagedBpp<?,?> processor)
          Construct new instance.
 
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.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BppManager

public BppManager(ManagedBpp<?,?> processor)
Construct new instance.

Parameters:
processor - Processor to expose
Method Detail

getMaxQueueSize

public int getMaxQueueSize()
Description copied from interface: BppManagerMBean
Current results queue size limit.

Specified by:
getMaxQueueSize in interface BppManagerMBean
Returns:
Current queue size limit.

getQueueSize

public int getQueueSize()
Description copied from interface: BppManagerMBean
Current size of the results queue.

Specified by:
getQueueSize in interface BppManagerMBean
Returns:
Current results queue size

setMaxQueueSize

public void setMaxQueueSize(int queueSize)
Description copied from interface: BppManagerMBean
Set new max queue size parameter.

Specified by:
setMaxQueueSize in interface BppManagerMBean
Parameters:
queueSize - New queue size

setPageSize

public void setPageSize(int size)
Description copied from interface: BppManagerMBean
Set new page size.

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

Specified by:
setPageSize in interface BppManagerMBean
Parameters:
size - New page size.

getPageSize

public int getPageSize()
Description copied from interface: BppManagerMBean
Current page size.

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

Specified by:
getPageSize in interface BppManagerMBean
Returns:
current page size

getInputCount

public long getInputCount()
Description copied from interface: BppManagerMBean
Number of individual inputs read from the input source.

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

Specified by:
getInputCount in interface BppManagerMBean
Returns:
Read input count

getOutputCount

public long getOutputCount()
Description copied from interface: BppManagerMBean
Number of reported results.

Specified by:
getOutputCount in interface BppManagerMBean
Returns:
Number of reported results

getNonFinishedCount

public int getNonFinishedCount()
Description copied from interface: BppManagerMBean
Non finished items in the queue.

Specified by:
getNonFinishedCount in interface BppManagerMBean
Returns:
Non finished items in the queue

getFirstPageSources

public String[] getFirstPageSources()
Description copied from interface: BppManagerMBean
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.

Specified by:
getFirstPageSources in interface BppManagerMBean
Returns:
Inputs represented by the first page

killAllAndFreeze

public void killAllAndFreeze()
Description copied from interface: BppManagerMBean
Kill first page and freeze worker.

Specified by:
killAllAndFreeze in interface BppManagerMBean

unfreeze

public void unfreeze()
Description copied from interface: BppManagerMBean
Unfreeze worker.

If the worker is not frozen do nothing.

Specified by:
unfreeze in interface BppManagerMBean

killFirstPage

public void killFirstPage()
Description copied from interface: BppManagerMBean
Kill first page unconditionally.

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

Specified by:
killFirstPage in interface BppManagerMBean

freeze

public void freeze()
Description copied from interface: BppManagerMBean
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.

Specified by:
freeze in interface BppManagerMBean

isFrozen

public boolean isFrozen()
Description copied from interface: BppManagerMBean
Check frozen status.

Specified by:
isFrozen in interface BppManagerMBean
Returns:
true if executor is frozen

killFirstPageIfBlocking

public void killFirstPageIfBlocking()
Description copied from interface: BppManagerMBean
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.

Specified by:
killFirstPageIfBlocking in interface BppManagerMBean

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)