public class AdapterCoordinatorImpl extends AbstractCoordinatedAdapter implements AdapterCoordinator
eventsToSend, scheduleSlot, stateManager
Constructor and Description |
---|
AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime,
boolean usingEngineThread)
Ctor.
|
AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime,
boolean usingEngineThread,
boolean usingExternalTimer,
boolean usingTimeSpanEvents)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
Does nothing.
|
void |
coordinate(com.espertech.esper.runtime.client.util.InputAdapter inputAdapter)
Coordinate an InputAdapter.
|
SendableEvent |
read()
Get the next event in line to be sent into the runtime , or null if there is no available event.
|
protected void |
replaceFirstEventToSend()
Replace the first member of eventsToSend with the next
event returned by the read() method of the same Adapter that
provided the first event.
|
protected void |
reset()
Reset all the changeable state of this ReadableAdapter, as if it were just created.
|
destroy, disallowStateTransitions, getProcessEvent, getState, pause, resume, setRuntime, setScheduleSlot, setSender, setUsingExternalTimer, setUsingRuntimeThread, start, stop
public AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime, boolean usingEngineThread)
runtime
- - the runtime for the runtimeservices and runtimeusingEngineThread
- - true if the coordinator should set time by the scheduling service in the runtime,
false if it should set time externally through the calling threadpublic AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime, boolean usingEngineThread, boolean usingExternalTimer, boolean usingTimeSpanEvents)
runtime
- - the runtime for the runtimeservices and runtimeusingEngineThread
- - true if the coordinator should set time by the scheduling service in the runtime,
false if it should set time externally through the calling threadusingExternalTimer
- - true to use esper's external timer mechanism instead of internal timingusingTimeSpanEvents
- - true for time span eventspublic SendableEvent read() throws com.espertech.esper.common.client.EPException
CoordinatedAdapter
read
in interface CoordinatedAdapter
com.espertech.esper.common.client.EPException
- in case of errors creating the eventpublic void coordinate(com.espertech.esper.runtime.client.util.InputAdapter inputAdapter)
AdapterCoordinator
coordinate
in interface AdapterCoordinator
inputAdapter
- - the InputAdapter to coordinateprotected void close()
close
in class AbstractCoordinatedAdapter
protected void replaceFirstEventToSend()
replaceFirstEventToSend
in class AbstractCoordinatedAdapter
protected void reset()
reset
in class AbstractCoordinatedAdapter