public class TerminalDocumentBus extends DocumentBus
Modifier and Type | Field and Description |
---|---|
protected static String |
ID_TERMINAL
id for the terminal document bus, which is output for exporters
|
documentBus, id, inputModuleControllerIds, lock, memPolicy, outputModuleControllerIds, waitUntilAllDocumentsArePut
Constructor and Description |
---|
TerminalDocumentBus(List<String> inputModuleControllerIds)
Creates an object of this type and sets all passed in- and output
ModuleControllerImpl objects. |
TerminalDocumentBus(String inputModuleControllerId)
Creates an object of this type and sets the passes the given input
controller and output controller.
|
Modifier and Type | Method and Description |
---|---|
DocumentController |
pop(String outputControllerId)
Returns a
DocumentController object, which is on first place of
the internal queue (regarding the FIFO principle). |
DocumentController |
pop(String outputControllerId,
boolean ignorePermissionForDocument)
Returns a
DocumentController object, which is on first place of
the internal queue (regarding the FIFO principle). |
finish, getDocumentBus, getId, getInputControllerIds, getMemPolicy, getOutputControllerIds, getPepperJob, init, initDocumentBus, isFinished, put, setMemPolicy, setPepperJob, toString
protected static final String ID_TERMINAL
public TerminalDocumentBus(String inputModuleControllerId)
inputModuleControllerId
- identifier of controller, which produces documents for this
buspublic TerminalDocumentBus(List<String> inputModuleControllerIds)
ModuleControllerImpl
objects. This is important, because an
DocumentController
can only be removed from queue, when all
output ModuleControllerImpl
objects requested the
DocumentController
object.inputModuleControllerIds
- list of identifier of controller, which produces documents for
this buspublic DocumentController pop(String outputControllerId, boolean ignorePermissionForDocument)
DocumentBus
DocumentController
object, which is on first place of
the internal queue (regarding the FIFO principle). When all registered
ModuleController
objects popped the DocumentController
object, it will be removed from internal queue. PepperJobImpl
gives the permission.
Otherwise, this method waits for the permission. PepperModule
has not finished all documentsPepperJobImpl
) gives
the permission to wake up the document, if it was in sleep mode
DocumentBus.pop(String)
, if
ignorePermissionForDocument
is set to true this method
returns a DocumentController
object even if the PepperJob
permission does not allow to process a further document. This mechanism
can be used, if a PepperModule
has an own control mechanism of
sending SDocument
s to sleep.pop
in class DocumentBus
outputControllerId
- object requesting the DocumentController
objectignorePermissionForDocument
- if set, a document will be returned even if the Pepper job
gives no permissionpublic DocumentController pop(String outputControllerId)
DocumentController
object, which is on first place of
the internal queue (regarding the FIFO principle). When all registered
ModuleControllerImpl
objects popped the
DocumentController
object, it will be removed from internal
queue.pop
in class DocumentBus
moduleController
- object requesting the DocumentController
objectCopyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.