public class IgniteStreamerImpl extends Object implements IgniteStreamerEx, Externalizable
| Constructor and Description |
|---|
IgniteStreamerImpl()
Empty constructor required by
Externalizable. |
IgniteStreamerImpl(GridKernalContext ctx,
StreamerConfiguration c) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(Object evt,
Object... evts)
Submits group of events for processing.
|
void |
addEvents(Collection<?> evts)
Submits group of events for processing.
|
void |
addEventsToStage(String stageName,
Collection<?> evts)
Submits events to streamer.
|
void |
addEventToStage(String stageName,
Object evt,
Object... evts)
Submits group of events to streamer.
|
void |
addStreamerFailureListener(StreamerFailureListener lsnr)
Adds streamer failure listener.
|
boolean |
cancelled(IgniteUuid futId)
Checks if cancel request was received for this future ID.
|
StreamerConfiguration |
configuration()
Gets streamer configuration.
|
StreamerContext |
context()
Gets streamer context.
|
void |
deployClass(Class<?> depCls)
Explicitly sets deployment class.
|
StreamerEventRouter |
eventRouter() |
GridKernalContext |
kernalContext() |
StreamerMetrics |
metrics()
Gets current streamer metrics.
|
String |
name()
Gets streamer name.
|
void |
onFutureCompleted(GridStreamerStageExecutionFuture fut)
Called when future is completed and parent should be notified, if any.
|
void |
onFutureMapped(GridStreamerStageExecutionFuture fut)
Called before execution requests are sent to remote nodes or scheduled for local execution.
|
void |
onKernalStop(boolean cancel)
On kernal stop callback.
|
void |
onQueryCompleted(long time,
int nodes)
Callback executed when streamer query completes.
|
void |
onUndeploy(ClassLoader undeployedLdr)
Callback for undeployed class loaders.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Reconstructs object on unmarshalling.
|
void |
removeStreamerFailureListener(StreamerFailureListener lsnr)
Removes streamer failure listener.
|
void |
reset()
Resets all configured streamer windows by calling
StreamerWindow.reset() on each and
clears local space. |
void |
resetMetrics()
Resets all streamer metrics.
|
void |
scheduleExecutions(GridStreamerStageExecutionFuture fut,
Map<UUID,GridStreamerExecutionBatch> execs)
Schedules batch executions either on local or on remote nodes.
|
void |
start() |
void |
stop(boolean cancel) |
String |
toString() |
<E> StreamerWindow<E> |
window()
Gets streamer default window (the first one in configuration list).
|
<E> StreamerWindow<E> |
window(String windowName)
Gets streamer window by window name.
|
void |
writeExternal(ObjectOutput out) |
public IgniteStreamerImpl()
Externalizable.public IgniteStreamerImpl(GridKernalContext ctx, StreamerConfiguration c)
ctx - Kernal context.c - Configuration.public void start()
throws IgniteCheckedException
IgniteCheckedException - If failed.public void onKernalStop(boolean cancel)
cancel - Cancel.public void stop(boolean cancel)
cancel - Whether currently running tasks should be cancelled.@Nullable public String name()
name in interface IgniteStreamernull for default no-name streamer.public StreamerConfiguration configuration()
configuration in interface IgniteStreamerpublic void addEvent(Object evt, Object... evts)
addEvent in interface IgniteStreamerevt - Event to add.evts - Optional events to add.public void addEventToStage(String stageName, Object evt, Object... evts)
addEventToStage in interface IgniteStreamerstageName - Stage name to start with.evt - Event tp process.evts - Optional events.public void addEvents(Collection<?> evts)
addEvents in interface IgniteStreamerevts - Events to add.public void addEventsToStage(String stageName, Collection<?> evts)
addEventsToStage in interface IgniteStreamerstageName - Stage name to start with.evts - Events to process.public StreamerContext context()
context in interface IgniteStreamerpublic void addStreamerFailureListener(StreamerFailureListener lsnr)
StreamerConfiguration.isAtLeastOnce() is set to false and on node which originated
pipeline execution otherwise.addStreamerFailureListener in interface IgniteStreamerlsnr - Listener to add.public void removeStreamerFailureListener(StreamerFailureListener lsnr)
removeStreamerFailureListener in interface IgniteStreamerlsnr - Listener to remove.public StreamerMetrics metrics()
metrics in interface IgniteStreamerpublic void reset()
StreamerWindow.reset() on each and
clears local space.
This is local method, it will clear only local windows and local space. Note that windows and space will not be cleaned while stages are executing, i.e. all currently running stages will have to complete before streamer can be reset.
reset in interface IgniteStreamerpublic void resetMetrics()
resetMetrics in interface IgniteStreamerpublic void deployClass(Class<?> depCls)
deployClass in interface IgniteStreamerdepCls - Deployment class.public <E> StreamerWindow<E> window()
window in interface IgniteStreamerExpublic <E> StreamerWindow<E> window(String windowName)
window in interface IgniteStreamerExwindowName - Window name.public GridKernalContext kernalContext()
kernalContext in interface IgniteStreamerExpublic void onFutureMapped(GridStreamerStageExecutionFuture fut)
onFutureMapped in interface IgniteStreamerExfut - Future.public void onFutureCompleted(GridStreamerStageExecutionFuture fut)
onFutureCompleted in interface IgniteStreamerExfut - Future.public StreamerEventRouter eventRouter()
eventRouter in interface IgniteStreamerExpublic void scheduleExecutions(GridStreamerStageExecutionFuture fut, Map<UUID,GridStreamerExecutionBatch> execs) throws IgniteCheckedException
scheduleExecutions in interface IgniteStreamerExfut - Future.execs - Executions grouped by node ID.IgniteCheckedException - If failed.public void onUndeploy(ClassLoader undeployedLdr)
onUndeploy in interface IgniteStreamerExundeployedLdr - Undeployed class loader.public void onQueryCompleted(long time,
int nodes)
onQueryCompleted in interface IgniteStreamerExtime - Consumed time.nodes - Participating nodes count.public boolean cancelled(IgniteUuid futId)
futId - Future ID.True if future was cancelled, false otherwise.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected Object readResolve()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015