|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.esper.adapter.AbstractCoordinatedAdapter
public abstract class AbstractCoordinatedAdapter
A skeleton implementation for coordinated adapter reading, for adapters that can do timestamp-coordinated input.
| Field Summary | |
|---|---|
protected SortedSet<SendableEvent> |
eventsToSend
Sorted events to be sent. |
protected net.esper.schedule.ScheduleSlot |
scheduleSlot
Slot for scheduling. |
protected AdapterStateManager |
stateManager
Statement management. |
| Fields inherited from interface net.esper.adapter.InputAdapter |
|---|
ESPERIO_MAP_EVENT_TYPE |
| Constructor Summary | |
|---|---|
AbstractCoordinatedAdapter(net.esper.client.EPServiceProvider epService,
boolean usingEngineThread)
Ctor. |
|
| Method Summary | |
|---|---|
protected abstract void |
close()
Perform any actions specific to this Adapter that should be completed before the Adapter is stopped. |
void |
destroy()
Destroy the Adapter, stopping the sending of all events and releasing all the resources, and disallowing any further state changes on the Adapter. |
void |
disallowStateTransitions()
Disallow subsequent state changes and throw an IllegalStateTransitionException if they are attempted. |
AdapterState |
getState()
Get the state of this Adapter. |
void |
pause()
Pause the sending of events after a Adapter has been started. |
protected abstract void |
replaceFirstEventToSend()
Remove the first member of eventsToSend and insert another event chosen in some fashion specific to this Adapter. |
protected abstract void |
reset()
Reset all the changeable state of this Adapter, as if it were just created. |
void |
resume()
Resume sending events after the Adapter has been paused. |
void |
setEPService(net.esper.client.EPServiceProvider epService)
Set the epService |
void |
setScheduleSlot(net.esper.schedule.ScheduleSlot scheduleSlot)
Set the scheduleSlot for this Adapter. |
void |
setUsingEngineThread(boolean usingEngineThread)
Set the usingEngineThread value |
void |
start()
Start the sending of events into the runtime egine. |
void |
stop()
Stop sending events and return the Adapter to the OPENED state, ready to be started once again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.esper.adapter.CoordinatedAdapter |
|---|
read |
| Field Detail |
|---|
protected final AdapterStateManager stateManager
protected final SortedSet<SendableEvent> eventsToSend
protected net.esper.schedule.ScheduleSlot scheduleSlot
| Constructor Detail |
|---|
public AbstractCoordinatedAdapter(net.esper.client.EPServiceProvider epService,
boolean usingEngineThread)
epService - - the EPServiceProvider for the engine runtime and servicesusingEngineThread - - true if the Adapter should set time by the scheduling service in the engine,
false if it should set time externally through the calling thread| Method Detail |
|---|
public AdapterState getState()
Adapter
getState in interface Adapter
public void start()
throws net.esper.client.EPException
Adapter
start in interface Adapternet.esper.client.EPException - in case of errors processing the events
public void pause()
throws net.esper.client.EPException
Adapter
pause in interface Adapternet.esper.client.EPException - if this Adapter has already been stopped
public void resume()
throws net.esper.client.EPException
Adapter
resume in interface Adapternet.esper.client.EPException - in case of errors processing the events
public void destroy()
throws net.esper.client.EPException
Adapter
destroy in interface Adapternet.esper.client.EPException - to indicate errors during destroy
public void stop()
throws net.esper.client.EPException
Adapter
stop in interface Adapternet.esper.client.EPException - in case of errors releasing resourcespublic void disallowStateTransitions()
CoordinatedAdapter
disallowStateTransitions in interface CoordinatedAdapterpublic void setUsingEngineThread(boolean usingEngineThread)
CoordinatedAdapter
setUsingEngineThread in interface CoordinatedAdapterusingEngineThread - - the value to setpublic void setScheduleSlot(net.esper.schedule.ScheduleSlot scheduleSlot)
CoordinatedAdapter
setScheduleSlot in interface CoordinatedAdapterscheduleSlot - - the scheduleSlot to setpublic void setEPService(net.esper.client.EPServiceProvider epService)
CoordinatedAdapter
setEPService in interface CoordinatedAdapterepService - - the value to setprotected abstract void close()
protected abstract void replaceFirstEventToSend()
protected abstract void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||