public class GridContinuousProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static IgniteProductVersion |
QUERY_MSG_VER_2_SINCE |
ctx, log| Constructor and Description |
|---|
GridContinuousProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBackupNotification(UUID nodeId,
UUID routineId,
Collection<?> objs,
Object orderedTopic) |
void |
addNotification(UUID nodeId,
UUID routineId,
Object obj,
Object orderedTopic,
boolean sync,
boolean msg) |
Serializable |
collectDiscoveryData(UUID nodeId)
Gets discovery data object that will be sent to new node
during discovery process.
|
GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
boolean |
lockStopping() |
void |
onCacheStart(GridCacheContext ctx)
Callback invoked when cache is started.
|
void |
onCacheStop(GridCacheContext ctx) |
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onDiscoveryDataReceived(UUID joiningNodeId,
UUID rmtNodeId,
Serializable obj)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
UUID |
registerStaticRoutine(String cacheName,
javax.cache.event.CacheEntryUpdatedListener<?,?> locLsnr,
CacheEntryEventSerializableFilter rmtFilter,
IgnitePredicate<ClusterNode> prjPred)
Registers routine info to be sent in discovery data during this node join
(to be used for internal queries started from client nodes).
|
void |
start()
Starts grid component.
|
IgniteInternalFuture<UUID> |
startRoutine(GridContinuousHandler hnd,
boolean locOnly,
int bufSize,
long interval,
boolean autoUnsubscribe,
IgnitePredicate<ClusterNode> prjPred) |
void |
stop(boolean cancel)
Stops grid component.
|
IgniteInternalFuture<?> |
stopRoutine(UUID routineId) |
void |
unlockStopping() |
assertParameter, onKernalStart, onReconnected, printMemoryStats, toString, validateNodepublic static final IgniteProductVersion QUERY_MSG_VER_2_SINCE
public GridContinuousProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public boolean lockStopping()
true if lock successful, false if processor already stopped.public void unlockStopping()
public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.@Nullable public GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectDiscoveryData(UUID).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapter@Nullable public Serializable 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(UUID joiningNodeId, UUID rmtNodeId, Serializable obj)
onDiscoveryDataReceived in interface GridComponentonDiscoveryDataReceived in class GridProcessorAdapterjoiningNodeId - Joining node ID.rmtNodeId - Remote node ID for which data is provided.obj - Discovery data object or null if nothing waspublic void onCacheStart(GridCacheContext ctx) throws IgniteCheckedException
ctx - Cache context.IgniteCheckedException - If failed.public void onCacheStop(GridCacheContext ctx)
ctx - Callback invoked when cache is stopped.public UUID registerStaticRoutine(String cacheName, javax.cache.event.CacheEntryUpdatedListener<?,?> locLsnr, CacheEntryEventSerializableFilter rmtFilter, @Nullable IgnitePredicate<ClusterNode> prjPred) throws IgniteCheckedException
cacheName - Cache name.locLsnr - Local listener.rmtFilter - Remote filter.prjPred - Projection predicate.IgniteCheckedException - If failed.public IgniteInternalFuture<UUID> startRoutine(GridContinuousHandler hnd, boolean locOnly, int bufSize, long interval, boolean autoUnsubscribe, @Nullable IgnitePredicate<ClusterNode> prjPred)
hnd - Handler.bufSize - Buffer size.interval - Time interval.autoUnsubscribe - Automatic unsubscribe flag.locOnly - Local only flag.prjPred - Projection predicate.public IgniteInternalFuture<?> stopRoutine(UUID routineId)
routineId - Consume ID.public void addBackupNotification(UUID nodeId, UUID routineId, Collection<?> objs, @Nullable Object orderedTopic) throws IgniteCheckedException
nodeId - ID of the node that started routine.routineId - Routine ID.objs - Notification objects.orderedTopic - Topic for ordered notifications. If null, non-ordered message will be sent.IgniteCheckedException - In case of error.public void addNotification(UUID nodeId, UUID routineId, @Nullable Object obj, @Nullable Object orderedTopic, boolean sync, boolean msg) throws IgniteCheckedException
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.sync - If true then waits for event acknowledgment.msg - If true then sent data is message.IgniteCheckedException - In case of error.public void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.IgniteCheckedException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017