Class UpdateDispatchFutureSpin
java.lang.Object
com.espertech.esper.runtime.internal.kernel.updatedispatch.UpdateDispatchFutureSpin
- All Implemented Interfaces:
com.espertech.esper.common.internal.statement.dispatch.Dispatchable
public class UpdateDispatchFutureSpin
extends Object
implements com.espertech.esper.common.internal.statement.dispatch.Dispatchable
UpdateDispatchFutureSpin can be added to a dispatch queue that is thread-local. It represents
is a stand-in for a future dispatching of a statement result to statement listeners.
UpdateDispatchFutureSpin is aware of future and past dispatches: (newest) DF3 <--> DF2 <--> DF1 (oldest), and uses a spin lock to block if required
-
Constructor Summary
ConstructorDescriptionUpdateDispatchFutureSpin
(com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService) Ctor - use for the first future to indicate completion.UpdateDispatchFutureSpin
(UpdateDispatchViewBlockingSpin view, UpdateDispatchFutureSpin earlier, long msecTimeout, com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService) Ctor. -
Method Summary
-
Constructor Details
-
UpdateDispatchFutureSpin
public UpdateDispatchFutureSpin(UpdateDispatchViewBlockingSpin view, UpdateDispatchFutureSpin earlier, long msecTimeout, com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService) Ctor.- Parameters:
view
- is the blocking dispatch view through which to execute a dispatchearlier
- is the older futuremsecTimeout
- is the timeout period to wait for listeners to complete a prior dispatchtimeSourceService
- time source provider
-
UpdateDispatchFutureSpin
public UpdateDispatchFutureSpin(com.espertech.esper.common.internal.schedule.TimeSourceService timeSourceService) Ctor - use for the first future to indicate completion.- Parameters:
timeSourceService
- time source provider
-
-
Method Details
-
isCompleted
public boolean isCompleted()Returns true if the dispatch completed for this future.- Returns:
- true for completed, false if not
-
execute
public void execute()- Specified by:
execute
in interfacecom.espertech.esper.common.internal.statement.dispatch.Dispatchable
-
getView
public com.espertech.esper.common.internal.statement.dispatch.UpdateDispatchView getView()- Specified by:
getView
in interfacecom.espertech.esper.common.internal.statement.dispatch.Dispatchable
-
cancelled
public void cancelled()- Specified by:
cancelled
in interfacecom.espertech.esper.common.internal.statement.dispatch.Dispatchable
-