Package com.espertech.esperio.csv
Class AdapterCoordinatorImpl
java.lang.Object
com.espertech.esperio.csv.AbstractCoordinatedAdapter
com.espertech.esperio.csv.AdapterCoordinatorImpl
- All Implemented Interfaces:
com.espertech.esper.runtime.client.util.Adapter
,com.espertech.esper.runtime.client.util.InputAdapter
,AdapterCoordinator
,CoordinatedAdapter
public class AdapterCoordinatorImpl
extends AbstractCoordinatedAdapter
implements AdapterCoordinator
An implementation of AdapterCoordinator.
-
Field Summary
Fields inherited from class com.espertech.esperio.csv.AbstractCoordinatedAdapter
eventsToSend, scheduleSlot, stateManager
Fields inherited from interface com.espertech.esper.runtime.client.util.InputAdapter
ESPERIO_JSON_EVENT_TYPE, ESPERIO_MAP_EVENT_TYPE
-
Constructor Summary
ConstructorDescriptionAdapterCoordinatorImpl
(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. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
Does nothing.void
coordinate
(com.espertech.esper.runtime.client.util.InputAdapter inputAdapter) Coordinate an InputAdapter.read()
Get the next event in line to be sent into the runtime , or null if there is no available event.protected void
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.Methods inherited from class com.espertech.esperio.csv.AbstractCoordinatedAdapter
destroy, disallowStateTransitions, getProcessEvent, getState, pause, resume, setRuntime, setScheduleSlot, setSender, setUsingExternalTimer, setUsingRuntimeThread, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.espertech.esper.runtime.client.util.Adapter
destroy, getState, pause, resume, start, stop
-
Constructor Details
-
AdapterCoordinatorImpl
public AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime, boolean usingEngineThread) Ctor.- Parameters:
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 thread
-
AdapterCoordinatorImpl
public AdapterCoordinatorImpl(com.espertech.esper.runtime.client.EPRuntime runtime, boolean usingEngineThread, boolean usingExternalTimer, boolean usingTimeSpanEvents) Ctor.- Parameters:
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 events
-
-
Method Details
-
read
Description copied from interface:CoordinatedAdapter
Get the next event in line to be sent into the runtime , or null if there is no available event.- Specified by:
read
in interfaceCoordinatedAdapter
- Returns:
- an instance of SendableEvent that wraps the next event to send, or null if none
- Throws:
com.espertech.esper.common.client.EPException
- in case of errors creating the event
-
coordinate
public void coordinate(com.espertech.esper.runtime.client.util.InputAdapter inputAdapter) Description copied from interface:AdapterCoordinator
Coordinate an InputAdapter.- Specified by:
coordinate
in interfaceAdapterCoordinator
- Parameters:
inputAdapter
- - the InputAdapter to coordinate
-
close
protected void close()Does nothing.- Specified by:
close
in classAbstractCoordinatedAdapter
-
replaceFirstEventToSend
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.- Specified by:
replaceFirstEventToSend
in classAbstractCoordinatedAdapter
-
reset
protected void reset()Reset all the changeable state of this ReadableAdapter, as if it were just created.- Specified by:
reset
in classAbstractCoordinatedAdapter
-