@GridToStringExclude public class GridKernalContextImpl extends Object implements GridKernalContext, Externalizable
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
execSvc |
protected ExecutorService |
restExecSvc |
protected ExecutorService |
sysExecSvc |
Modifier | Constructor and Description |
---|---|
|
GridKernalContextImpl()
No-arg constructor is required by externalization.
|
protected |
GridKernalContextImpl(GridLoggerProxy log,
IgniteEx grid,
IgniteConfiguration cfg,
GridKernalGateway gw,
ExecutorService utilityCachePool,
ExecutorService marshCachePool,
ExecutorService execSvc,
ExecutorService sysExecSvc,
ExecutorService p2pExecSvc,
ExecutorService mgmtExecSvc,
ExecutorService igfsExecSvc,
ExecutorService restExecSvc,
List<PluginProvider> plugins)
Creates new kernal context.
|
Modifier and Type | Method and Description |
---|---|
void |
add(GridComponent comp) |
void |
add(GridComponent comp,
boolean addToList) |
void |
addHelper(Object helper) |
Object |
addNodeAttribute(String key,
Object val)
Add attribute to node attributes.
|
GridAffinityProcessor |
affinity()
Gets cache data affinity processor.
|
GridCacheProcessor |
cache()
Gets caches processor.
|
IgniteCacheObjectProcessor |
cacheObjects()
Gets cache object processor.
|
GridCheckpointManager |
checkpoint()
Gets checkpoint manager.
|
boolean |
clientDisconnected() |
boolean |
clientNode() |
GridClockSyncProcessor |
clockSync()
Gets time processor.
|
GridClosureProcessor |
closure()
Gets closure processor.
|
ClusterProcessor |
cluster()
Gets Cluster processor.
|
GridCollisionManager |
collision()
Gets collision manager.
|
List<GridComponent> |
components()
Gets list of all grid components in the order they were added.
|
IgniteConfiguration |
config()
Gets grid configuration.
|
GridContinuousProcessor |
continuous()
Gets event continuous processor.
|
<T> T |
createComponent(Class<T> cls)
Creates optional component.
|
<K,V> DataStreamProcessor<K,V> |
dataStream()
Gets data streamer processor.
|
DataStructuresProcessor |
dataStructures()
Gets data structures processor.
|
GridDeploymentManager |
deploy()
Gets deployment manager.
|
GridDiscoveryManager |
discovery()
Gets discovery manager.
|
GridEventStorageManager |
event()
Gets event storage manager.
|
IgniteExceptionRegistry |
exceptionRegistry()
Gets exception registry.
|
GridFailoverManager |
failover()
Gets failover manager.
|
GridKernalGateway |
gateway()
Gets kernal gateway.
|
ExecutorService |
getExecutorService() |
ExecutorService |
getIgfsExecutorService()
Executor service that is in charge of processing outgoing IGFS messages.
|
ExecutorService |
getManagementExecutorService()
Executor service that is in charge of processing internal and Visor
GridJobs . |
ExecutorService |
getPeerClassLoadingExecutorService() |
ExecutorService |
getRestExecutorService()
Should return an instance of fully configured thread pool to be used for
processing of client messages (REST requests).
|
ExecutorService |
getSystemExecutorService()
Executor service that is in charge of processing internal system messages.
|
IgniteEx |
grid()
Gets grid instance managed by kernal.
|
String |
gridName()
Gets grid name.
|
HadoopProcessorAdapter |
hadoop()
Gets Hadoop processor.
|
boolean |
hasNodeAttribute(String key)
Check if node has specified attribute.
|
IgfsProcessorAdapter |
igfs()
Gets file system processor.
|
IgfsHelper |
igfsHelper()
Gets IGFS utils processor.
|
GridIndexingManager |
indexing()
Gets indexing manager.
|
GridIoManager |
io()
Gets communication manager.
|
boolean |
isDaemon()
Checks whether this node is daemon.
|
boolean |
isStopping() |
Iterator<GridComponent> |
iterator() |
GridJobProcessor |
job()
Gets job processor.
|
GridJobMetricsProcessor |
jobMetric()
Gets job metric processor.
|
GridLoadBalancerManager |
loadBalancing()
Gets load balancing manager.
|
UUID |
localNodeId()
Gets local node ID.
|
IgniteLogger |
log(Class<?> cls)
Gets logger for given class.
|
IgniteLogger |
log(String ctgr)
Gets logger for given category.
|
void |
markSegmented()
Sets segmented flag to
true when node is stopped due to segmentation issues. |
ExecutorService |
marshallerCachePool()
Gets marshaller cache pool.
|
MarshallerContextImpl |
marshallerContext()
Gets marshaller context.
|
Object |
nodeAttribute(String key)
Get node attribute by name.
|
Map<String,Object> |
nodeAttributes() |
GridOffHeapProcessor |
offheap()
Gets offheap processor.
|
GridPerformanceSuggestions |
performance() |
PlatformProcessor |
platform() |
PluginProvider |
pluginProvider(String name) |
IgnitePluginProcessor |
plugins() |
GridPortProcessor |
ports()
Gets port processor.
|
void |
printMemoryStats()
Print grid kernal memory stats (sizes of internal structures, etc.).
|
GridQueryProcessor |
query()
Gets query processor.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve()
Reconstructs object on unmarshalling.
|
GridResourceProcessor |
resource()
Gets resource processor.
|
GridRestProcessor |
rest()
Gets REST processor.
|
IgniteScheduleProcessorAdapter |
schedule()
Gets schedule processor.
|
GridSecurityProcessor |
security()
Gets authentication processor.
|
GridSegmentationProcessor |
segmentation()
Gets segmentation processor.
|
boolean |
segmented()
Gets segmented flag.
|
GridServiceProcessor |
service()
Gets service processor.
|
GridTaskSessionProcessor |
session()
Gets task session processor.
|
GridSwapSpaceManager |
swap()
Gets swap space manager.
|
GridTaskProcessor |
task()
Gets task processor.
|
GridTimeoutProcessor |
timeout()
Gets timeout processor.
|
GridClockSource |
timeSource()
Gets grid time source.
|
void |
timeSource(GridClockSource clockSrc)
Sets time source.
|
String |
toString() |
String |
userVersion(ClassLoader ldr)
Gets user version for given class loader by checking
META-INF/ignite.xml file for userVersion attribute. |
ExecutorService |
utilityCachePool()
Gets utility cache pool.
|
void |
writeExternal(ObjectOutput out) |
@GridToStringExclude protected ExecutorService execSvc
@GridToStringExclude protected ExecutorService sysExecSvc
@GridToStringExclude protected ExecutorService restExecSvc
public GridKernalContextImpl()
protected GridKernalContextImpl(GridLoggerProxy log, IgniteEx grid, IgniteConfiguration cfg, GridKernalGateway gw, ExecutorService utilityCachePool, ExecutorService marshCachePool, ExecutorService execSvc, ExecutorService sysExecSvc, ExecutorService p2pExecSvc, ExecutorService mgmtExecSvc, ExecutorService igfsExecSvc, ExecutorService restExecSvc, List<PluginProvider> plugins) throws IgniteCheckedException
log
- Logger.grid
- Grid instance managed by kernal.cfg
- Grid configuration.gw
- Kernal gateway.utilityCachePool
- Utility cache pool.marshCachePool
- Marshaller cache pool.execSvc
- Public executor service.sysExecSvc
- System executor service.p2pExecSvc
- P2P executor service.mgmtExecSvc
- Management executor service.igfsExecSvc
- IGFS executor service.restExecSvc
- REST executor service.plugins
- Plugin providers.IgniteCheckedException
- In case of error.public Iterator<GridComponent> iterator()
iterator
in interface Iterable<GridComponent>
public List<GridComponent> components()
components
in interface GridKernalContext
public void add(GridComponent comp)
comp
- Manager to add.public void add(GridComponent comp, boolean addToList)
comp
- Manager to add.addToList
- If true
component is added to components list.public void addHelper(Object helper)
helper
- Helper to add.public boolean isStopping()
isStopping
in interface GridKernalContext
True
if grid is in the process of stopping.public UUID localNodeId()
localNodeId
in interface GridKernalContext
public String gridName()
gridName
in interface GridKernalContext
public GridKernalGateway gateway()
gateway
in interface GridKernalContext
public IgniteEx grid()
grid
in interface GridKernalContext
public IgniteConfiguration config()
config
in interface GridKernalContext
public GridTaskProcessor task()
task
in interface GridKernalContext
public GridJobProcessor job()
job
in interface GridKernalContext
public GridTimeoutProcessor timeout()
timeout
in interface GridKernalContext
public GridClockSyncProcessor clockSync()
clockSync
in interface GridKernalContext
public GridResourceProcessor resource()
resource
in interface GridKernalContext
public GridJobMetricsProcessor jobMetric()
jobMetric
in interface GridKernalContext
public GridCacheProcessor cache()
cache
in interface GridKernalContext
public GridTaskSessionProcessor session()
session
in interface GridKernalContext
public GridClosureProcessor closure()
closure
in interface GridKernalContext
public GridServiceProcessor service()
service
in interface GridKernalContext
public GridPortProcessor ports()
ports
in interface GridKernalContext
public GridOffHeapProcessor offheap()
offheap
in interface GridKernalContext
public IgniteScheduleProcessorAdapter schedule()
schedule
in interface GridKernalContext
public GridDeploymentManager deploy()
deploy
in interface GridKernalContext
public GridIoManager io()
io
in interface GridKernalContext
public GridDiscoveryManager discovery()
discovery
in interface GridKernalContext
public GridCheckpointManager checkpoint()
checkpoint
in interface GridKernalContext
public GridEventStorageManager event()
event
in interface GridKernalContext
public GridFailoverManager failover()
failover
in interface GridKernalContext
public GridCollisionManager collision()
collision
in interface GridKernalContext
public GridSecurityProcessor security()
security
in interface GridKernalContext
public GridLoadBalancerManager loadBalancing()
loadBalancing
in interface GridKernalContext
public GridSwapSpaceManager swap()
swap
in interface GridKernalContext
public GridIndexingManager indexing()
indexing
in interface GridKernalContext
public GridAffinityProcessor affinity()
affinity
in interface GridKernalContext
public GridRestProcessor rest()
rest
in interface GridKernalContext
public GridSegmentationProcessor segmentation()
segmentation
in interface GridKernalContext
public <K,V> DataStreamProcessor<K,V> dataStream()
dataStream
in interface GridKernalContext
public IgfsProcessorAdapter igfs()
igfs
in interface GridKernalContext
public IgfsHelper igfsHelper()
igfsHelper
in interface GridKernalContext
public GridContinuousProcessor continuous()
continuous
in interface GridKernalContext
public HadoopProcessorAdapter hadoop()
hadoop
in interface GridKernalContext
public ExecutorService utilityCachePool()
utilityCachePool
in interface GridKernalContext
public ExecutorService marshallerCachePool()
marshallerCachePool
in interface GridKernalContext
public IgniteCacheObjectProcessor cacheObjects()
cacheObjects
in interface GridKernalContext
public GridQueryProcessor query()
query
in interface GridKernalContext
public DataStructuresProcessor dataStructures()
dataStructures
in interface GridKernalContext
public IgniteLogger log(String ctgr)
log
in interface GridKernalContext
ctgr
- Category.public IgniteLogger log(Class<?> cls)
log
in interface GridKernalContext
cls
- Class to get logger for.public void markSegmented()
true
when node is stopped due to segmentation issues.markSegmented
in interface GridKernalContext
public boolean segmented()
segmented
in interface GridKernalContext
True
if network is currently segmented, false
otherwise.public GridClockSource timeSource()
timeSource
in interface GridKernalContext
public void timeSource(GridClockSource clockSrc)
clockSrc
- Time source.public GridPerformanceSuggestions performance()
performance
in interface GridKernalContext
public void printMemoryStats()
printMemoryStats
in interface GridKernalContext
public boolean isDaemon()
isDaemon
in interface GridKernalContext
True
if this node is daemon, false
otherwise.public String userVersion(ClassLoader ldr)
META-INF/ignite.xml
file for userVersion
attribute. If
ignite.xml
file is not found, or user version is not specified there,
then default version (empty string) is returned.userVersion
in interface GridKernalContext
ldr
- Class loader.public PluginProvider pluginProvider(String name) throws PluginNotFoundException
pluginProvider
in interface GridKernalContext
name
- Plugin name.PluginNotFoundException
- If plugin provider for the given name was not found.@Nullable public <T> T createComponent(Class<T> cls)
createComponent
in interface GridKernalContext
cls
- Component class.public IgnitePluginProcessor plugins()
plugins
in interface GridKernalContext
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
protected Object readResolve() throws ObjectStreamException
ObjectStreamException
- Thrown in case of unmarshalling error.public ExecutorService getExecutorService()
getExecutorService
in interface GridKernalContext
public ExecutorService getSystemExecutorService()
getSystemExecutorService
in interface GridKernalContext
public ExecutorService getManagementExecutorService()
GridJobs
.getManagementExecutorService
in interface GridKernalContext
public ExecutorService getPeerClassLoadingExecutorService()
getPeerClassLoadingExecutorService
in interface GridKernalContext
public ExecutorService getIgfsExecutorService()
getIgfsExecutorService
in interface GridKernalContext
public ExecutorService getRestExecutorService()
getRestExecutorService
in interface GridKernalContext
public IgniteExceptionRegistry exceptionRegistry()
exceptionRegistry
in interface GridKernalContext
public Object nodeAttribute(String key)
nodeAttribute
in interface GridKernalContext
key
- Attribute name.public boolean hasNodeAttribute(String key)
hasNodeAttribute
in interface GridKernalContext
key
- Attribute name.true
If node has attribute with specified name.public Object addNodeAttribute(String key, Object val)
addNodeAttribute
in interface GridKernalContext
key
- Attribute name.val
- Attribute value.public Map<String,Object> nodeAttributes()
nodeAttributes
in interface GridKernalContext
public ClusterProcessor cluster()
cluster
in interface GridKernalContext
public MarshallerContextImpl marshallerContext()
marshallerContext
in interface GridKernalContext
public boolean clientNode()
clientNode
in interface GridKernalContext
True
if local node is client node (has flag IgniteConfiguration.isClientMode()
set).public boolean clientDisconnected()
clientDisconnected
in interface GridKernalContext
True
if local node in disconnected state.public PlatformProcessor platform()
platform
in interface GridKernalContext
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0.final Release Date : December 29 2015