public class IgniteServiceProcessor extends ServiceProcessorAdapter implements IgniteChangeGlobalStateSupport
DiscoverySpi and
CommunicationSpi messages.ServiceDeploymentManager,
ServiceDeploymentTask,
ServiceDeploymentActions,
ServiceChangeBatchRequestGridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
SVCS_VIEW |
static String |
SVCS_VIEW_DESC |
ctx, diagnosticLog, log| Constructor and Description |
|---|
IgniteServiceProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
IgniteInternalFuture<?> |
cancel(String name) |
IgniteInternalFuture<?> |
cancelAll() |
IgniteInternalFuture<?> |
cancelAll(@NotNull Collection<String> servicesNames) |
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. |
IgniteInternalFuture<?> |
deployAll(ClusterGroup prj,
Collection<ServiceConfiguration> cfgs) |
IgniteInternalFuture<?> |
deployClusterSingleton(ClusterGroup prj,
String name,
Service srvc) |
IgniteInternalFuture<?> |
deployKeyAffinitySingleton(String name,
Service srvc,
String cacheName,
Object affKey) |
ServiceDeploymentManager |
deployment() |
IgniteInternalFuture<?> |
deployMultiple(ClusterGroup prj,
String name,
Service srvc,
int totalCnt,
int maxPerNodeCnt) |
IgniteInternalFuture<?> |
deployNodeSingleton(ClusterGroup prj,
String name,
Service srvc) |
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
void |
onActivate(GridKernalContext kctx)
Called when cluster performing activation.
|
void |
onDeActivate(GridKernalContext kctx)
Invokes from services deployment worker.
|
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 |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onLocalJoin(DiscoveryEvent evt,
DiscoCache discoCache)
Callback for local join events for which the regular events are not generated.
|
IgniteInternalFuture<?> |
onReconnected(boolean active)
Client reconnected callback.
|
<T> T |
service(String name) |
ServiceContextImpl |
serviceContext(String name) |
Collection<ServiceDescriptor> |
serviceDescriptors() |
<T> T |
serviceProxy(ClusterGroup prj,
String name,
Class<? super T> srvcCls,
boolean sticky,
long timeout) |
<T> Collection<T> |
services(String name) |
Map<UUID,Integer> |
serviceTopology(String name,
long timeout) |
void |
start()
Starts grid component.
|
assertParameter, printMemoryStats, stop, toString, validateNode, validateNodepublic static final String SVCS_VIEW
public static final String SVCS_VIEW_DESC
public IgniteServiceProcessor(GridKernalContext ctx)
ctx - Kernal context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridProcessorAdapterdata - 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 collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived in interface GridComponentonJoiningNodeDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.JoiningNodeDiscoveryData interface to retrieve discovery data of joining node.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic void onActivate(GridKernalContext kctx)
onActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.public void onDeActivate(GridKernalContext kctx)
onDeActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.public IgniteInternalFuture<?> onReconnected(boolean active) throws IgniteCheckedException
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapteractive - Cluster restarted flag.IgniteCheckedException - If failed.public IgniteInternalFuture<?> deployNodeSingleton(ClusterGroup prj, String name, Service srvc)
deployNodeSingleton in class ServiceProcessorAdapterprj - Grid projection.name - Service name.srvc - Service.public IgniteInternalFuture<?> deployClusterSingleton(ClusterGroup prj, String name, Service srvc)
deployClusterSingleton in class ServiceProcessorAdaptername - Service name.srvc - Service instance.public IgniteInternalFuture<?> deployMultiple(ClusterGroup prj, String name, Service srvc, int totalCnt, int maxPerNodeCnt)
deployMultiple in class ServiceProcessorAdaptername - Service name.srvc - Service.totalCnt - Total count.maxPerNodeCnt - Max per-node count.public IgniteInternalFuture<?> deployKeyAffinitySingleton(String name, Service srvc, String cacheName, Object affKey)
deployKeyAffinitySingleton in class ServiceProcessorAdaptername - Service name.srvc - Service.cacheName - Cache name.affKey - Affinity key.public IgniteInternalFuture<?> deployAll(ClusterGroup prj, Collection<ServiceConfiguration> cfgs)
deployAll in class ServiceProcessorAdapterprj - Grid projection.cfgs - Service configurations.public IgniteInternalFuture<?> cancel(String name)
cancel in class ServiceProcessorAdaptername - Service name.public IgniteInternalFuture<?> cancelAll()
cancelAll in class ServiceProcessorAdapterpublic IgniteInternalFuture<?> cancelAll(@NotNull @NotNull Collection<String> servicesNames)
cancelAll in class ServiceProcessorAdapterservicesNames - Name of services to deploy.public Map<UUID,Integer> serviceTopology(String name, long timeout) throws IgniteCheckedException
serviceTopology in class ServiceProcessorAdaptername - Service name.timeout - If greater than 0 limits task execution time. Cannot be negative.IgniteCheckedException - On error.public Collection<ServiceDescriptor> serviceDescriptors()
serviceDescriptors in class ServiceProcessorAdapterpublic <T> T service(String name)
service in class ServiceProcessorAdapterT - Service type.name - Service name.public ServiceContextImpl serviceContext(String name)
serviceContext in class ServiceProcessorAdaptername - Service name.public <T> T serviceProxy(ClusterGroup prj, String name, Class<? super T> srvcCls, boolean sticky, long timeout) throws IgniteException
serviceProxy in class ServiceProcessorAdapterT - Service interface type.prj - Grid projection.name - Service name.srvcCls - Service class.sticky - Whether multi-node request should be done.timeout - If greater than 0 limits service acquire time. Cannot be negative.IgniteException - If failed to create proxy.public <T> Collection<T> services(String name)
services in class ServiceProcessorAdapterT - Service type.name - Service name.public void onLocalJoin(DiscoveryEvent evt, DiscoCache discoCache)
onLocalJoin in class ServiceProcessorAdapterevt - Discovery event.discoCache - Discovery cache.public ServiceDeploymentManager deployment()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021