|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jawk.jrt.BlockObject
org.jawk.jrt.BulkBlockObject
public final class BulkBlockObject
A convenience class that blocks until any Blockable in the handles set is ready with data (i.e., will not block). It's like BlockObject in that this is returned to the AVM/AwkScript for execution by the BlockManager. Unlike the BlockObject, however, it implements the block() and getNotifierTag() to manage blocking for a collection of Blockables.
BlockManager
,
BlockObject
Constructor Summary | |
---|---|
BulkBlockObject(java.lang.String prefix,
java.util.Map<java.lang.String,? extends Blockable> blockables,
VariableManager vm)
Construct a block object which waits for any Blockable within the set of Blockables to "unblock". |
Method Summary | |
---|---|
void |
block()
Block until meaningful data is made available for the client application. |
boolean |
containsHandle(java.lang.String handle)
|
java.lang.String |
getNotifierTag()
What to return to the client code when a handle is non-blocking. |
BlockObject |
populateHandleSet(java.lang.Object[] args,
VariableManager vm)
|
BlockObject |
populateHandleSet(java.lang.Object[] args,
VariableManager vm,
BlockHandleValidator validator)
|
Methods inherited from class org.jawk.jrt.BlockObject |
---|
clearNextBlockObject, getBlockObjects, setNextBlockObject, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BulkBlockObject(java.lang.String prefix, java.util.Map<java.lang.String,? extends Blockable> blockables, VariableManager vm)
prefix
- First part of the return string for the block operation.blockables
- All universe of handles and their associated blockables.vm
- Required to obtain OFS (used in the construction of the
return string / notifier tag).Method Detail |
---|
public final boolean containsHandle(java.lang.String handle)
public final java.lang.String getNotifierTag()
The format is as follows :
prefix OFS handle
- Specified by:
getNotifierTag
in classBlockObject
- Returns:
- The client string containing the handle of the non-blocking object.
public final void block() throws java.lang.InterruptedException
BlockObject
block
in class BlockObject
java.lang.InterruptedException
public final BlockObject populateHandleSet(java.lang.Object[] args, VariableManager vm)
public final BlockObject populateHandleSet(java.lang.Object[] args, VariableManager vm, BlockHandleValidator validator)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |