public class GridContinuousProcessor extends GridProcessorAdapter
ctx, log| Constructor and Description |
|---|
GridContinuousProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotification(UUID nodeId,
UUID routineId,
Object obj,
Object orderedTopic) |
Object |
collectDiscoveryData(UUID nodeId)
Gets discovery data object that will be sent to new node
during discovery process.
|
void |
onDiscoveryDataReceived(Object obj)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
start()
Starts grid component.
|
GridFuture<UUID> |
startRoutine(GridContinuousHandler hnd,
int bufSize,
long interval,
boolean autoUnsubscribe,
GridPredicate<GridNode> prjPred) |
void |
stop(boolean cancel)
Stops grid component.
|
GridFuture<?> |
stopRoutine(UUID routineId) |
addAttributes, assertParameter, onKernalStart, onKernalStop, printMemoryStats, toString, validateNodepublic GridContinuousProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws GridException
start in interface GridComponentstart in class GridProcessorAdapterGridException - Throws in case of any errors.public void stop(boolean cancel)
throws GridException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.GridException - Thrown in case of any errors.@Nullable public Object collectDiscoveryData(UUID nodeId)
collectDiscoveryData in interface GridComponentcollectDiscoveryData in class GridProcessorAdapternodeId - ID of new node that joins topology.null if there is nothing
to send for this component.public void onDiscoveryDataReceived(Object obj)
onDiscoveryDataReceived in interface GridComponentonDiscoveryDataReceived in class GridProcessorAdapterobj - Discovery data object or null if nothing was
sent for this component.public GridFuture<UUID> startRoutine(GridContinuousHandler hnd, int bufSize, long interval, boolean autoUnsubscribe, @Nullable GridPredicate<GridNode> prjPred)
hnd - Handler.bufSize - Buffer size.interval - Time interval.autoUnsubscribe - Automatic unsubscribe flag.prjPred - Projection predicate.public GridFuture<?> stopRoutine(UUID routineId)
routineId - Consume ID.public void addNotification(UUID nodeId, UUID routineId, @Nullable Object obj, @Nullable Object orderedTopic) throws GridException
nodeId - ID of the node that started routine.routineId - Routine ID.obj - Notification object.orderedTopic - Topic for ordered notifications.
If null, non-ordered message will be sent.GridException - In case of error.Copyright © 2014. All rights reserved.