public class GridContinuousProcessor extends GridProcessorAdapter
Modifier and Type | Class and Description |
---|---|
static class |
GridContinuousProcessor.LocalRoutineInfo
Local routine info.
|
static class |
GridContinuousProcessor.RemoteRoutineInfo
Remote routine info.
|
static interface |
GridContinuousProcessor.RoutineInfo
Routine interface info.
|
GridComponent.DiscoveryDataExchangeType
Modifier and Type | Field and Description |
---|---|
static String |
CQ_SYS_VIEW |
static String |
CQ_SYS_VIEW_DESC |
ctx, diagnosticLog, log
Constructor and Description |
---|
GridContinuousProcessor(GridKernalContext ctx) |
Modifier and Type | Method and Description |
---|---|
void |
addBackupNotification(UUID nodeId,
UUID routineId,
Collection<?> objs,
@Nullable Object orderedTopic) |
void |
addNotification(UUID nodeId,
UUID routineId,
@Nullable Object obj,
@Nullable Object orderedTopic,
boolean sync,
boolean msg) |
void |
collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receiving
TcpDiscoveryNodeAddedMessage . |
void |
collectJoiningNodeData(DiscoveryDataBag dataBag)
Collects discovery data on joining node before sending
TcpDiscoveryJoinRequestMessage request. |
@Nullable 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 |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node).
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
UUID |
registerStaticRoutine(String cacheName,
javax.cache.event.CacheEntryUpdatedListener<?,?> locLsnr,
CacheEntryEventSerializableFilter rmtFilter,
@Nullable 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,
@Nullable IgnitePredicate<ClusterNode> prjPred) |
void |
stop(boolean cancel)
Stops grid component.
|
IgniteInternalFuture<?> |
stopRoutine(UUID routineId) |
void |
unlockStopping() |
assertParameter, onKernalStart, onReconnected, printMemoryStats, toString, validateNode, validateNode
public static final String CQ_SYS_VIEW
public static final String CQ_SYS_VIEW_DESC
public GridContinuousProcessor(GridKernalContext ctx)
ctx
- Kernal context.public void start() throws IgniteCheckedException
start
in interface GridComponent
start
in class GridProcessorAdapter
IgniteCheckedException
- 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 GridComponent
onKernalStop
in class GridProcessorAdapter
cancel
- Flag indicating whether jobs should be canceled.public void stop(boolean cancel) throws IgniteCheckedException
stop
in interface GridComponent
stop
in class GridProcessorAdapter
cancel
- If true
, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException
- Thrown in case of any errors.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag)
.discoveryDataType
in interface GridComponent
discoveryDataType
in class GridProcessorAdapter
public void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage
request.collectJoiningNodeData
in interface GridComponent
collectJoiningNodeData
in class GridProcessorAdapter
dataBag
- container object to store discovery data in.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage
.collectGridNodeData
in interface GridComponent
collectGridNodeData
in class GridProcessorAdapter
dataBag
- container object to store discovery data in.public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived
in interface GridComponent
onJoiningNodeDataReceived
in class GridProcessorAdapter
data
- DiscoveryDataBag.JoiningNodeDiscoveryData
interface to retrieve discovery data of joining node.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived
in interface GridComponent
onGridDataReceived
in class GridProcessorAdapter
data
- DiscoveryDataBag.GridDiscoveryData
interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).public 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 @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 @Nullable IgnitePredicate<ClusterNode> prjPred) throws IgniteCheckedException
hnd
- Handler.bufSize
- Buffer size.interval
- Time interval.autoUnsubscribe
- Automatic unsubscribe flag.locOnly
- Local only flag.prjPred
- Projection predicate.IgniteCheckedException
public IgniteInternalFuture<?> stopRoutine(UUID routineId)
routineId
- Consume ID.public void addBackupNotification(UUID nodeId, UUID routineId, Collection<?> objs, @Nullable @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 @Nullable Object obj, @Nullable @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)
onDisconnected
in interface GridComponent
onDisconnected
in class GridProcessorAdapter
reconnectFut
- Reconnect future.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021