Class IsolatedNode
- java.lang.Object
- 
- org.apache.ignite.spi.discovery.isolated.IsolatedNode
 
- 
- All Implemented Interfaces:
- BaselineNode,- ClusterNode,- org.apache.ignite.internal.managers.discovery.IgniteClusterNode
 
 public class IsolatedNode extends Object implements org.apache.ignite.internal.managers.discovery.IgniteClusterNode Special isolated node.
- 
- 
Constructor SummaryConstructors Constructor Description IsolatedNode(UUID id, Map<String,Object> attrs, IgniteProductVersion ver)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>addresses()Gets collection of addresses this node is known by.<T> Tattribute(String name)Gets a node attribute.Map<String,Object>attributes()Gets all node attributes.Map<Integer,CacheMetrics>cacheMetrics()Gets collections of cache metrics for this node.ObjectconsistentId()Gets consistent globally unique node ID.Collection<String>hostNames()Gets collection of host names this node is known by.UUIDid()Gets globally unique node ID.booleanisClient()Whether this node is cache client (seeIgniteConfiguration.isClientMode()).booleanisLocal()Tests whether or not this node is a local node.ClusterMetricsmetrics()Gets metrics snapshot for this node.longorder()Node order within grid topology.voidsetAttributes(Map<String,Object> attrs)voidsetCacheMetrics(Map<Integer,CacheMetrics> cacheMetrics)Sets node cache metrics.voidsetConsistentId(Serializable consistentId)Sets consistent globally unique node ID which survives node restarts.voidsetMetrics(ClusterMetrics metrics)Sets node metrics.IgniteProductVersionversion()Gets node version.
 
- 
- 
- 
Constructor Detail- 
IsolatedNodepublic IsolatedNode(UUID id, Map<String,Object> attrs, IgniteProductVersion ver) - Parameters:
- id- Node ID.
- attrs- Node attributes.
- ver- Node version.
 
 
- 
 - 
Method Detail- 
idpublic UUID id() Gets globally unique node ID. A new ID is generated every time a node restarts.- Specified by:
- idin interface- ClusterNode
- Returns:
- Globally unique node ID.
 
 - 
consistentIdpublic Object consistentId() Gets consistent globally unique node ID. UnlikeClusterNode.id()method, this method returns consistent node ID which survives node restarts.- Specified by:
- consistentIdin interface- BaselineNode
- Specified by:
- consistentIdin interface- ClusterNode
- Returns:
- Consistent globally unique node ID.
 
 - 
attributepublic <T> T attribute(String name) Gets a node attribute. Attributes are assigned to nodes at startup viaIgniteConfiguration.getUserAttributes()method.The system adds the following attributes automatically: - {@link System#getProperties()}- All system properties.
- {@link System#getenv(String)}- All environment properties.
- All attributes defined in IgniteNodeAttributes
 Note that attributes cannot be changed at runtime. - Specified by:
- attributein interface- BaselineNode
- Specified by:
- attributein interface- ClusterNode
- Type Parameters:
- T- Attribute Type.
- Parameters:
- name- Attribute name. Note that attribute names starting with- org.apache.igniteare reserved for internal use.
- Returns:
- Attribute value or null.
 
 - 
metricspublic ClusterMetrics metrics() Gets metrics snapshot for this node. Note that node metrics are constantly updated and provide up to date information about nodes. For example, you can get an idea about CPU load on remote node viaClusterMetrics.getCurrentCpuLoad()method and use it duringComputeTask.map(List, Object)or during collision resolution.Node metrics are updated with some delay which is controlled by IgniteConfiguration.getMetricsUpdateFrequency()parameter. By default the update will happen every2seconds.- Specified by:
- metricsin interface- ClusterNode
- Returns:
- Runtime metrics snapshot for this node.
 
 - 
attributespublic Map<String,Object> attributes() Gets all node attributes. Attributes are assigned to nodes at startup viaIgniteConfiguration.getUserAttributes()method.The system adds the following attributes automatically: - {@link System#getProperties()}- All system properties.
- {@link System#getenv(String)}- All environment properties.
- All attributes defined in IgniteNodeAttributes
 Note that attributes cannot be changed at runtime. - Specified by:
- attributesin interface- BaselineNode
- Specified by:
- attributesin interface- ClusterNode
- Returns:
- All node attributes.
 
 - 
addressespublic Collection<String> addresses() Gets collection of addresses this node is known by.If IgniteConfiguration.getLocalHost()value isn'tnullnode will try to use that address for all communications and returned collection will contain only that address. If it isnullthen local wildcard address will be used, and Ignite will make the best effort to supply all addresses of that node in returned collection.- Specified by:
- addressesin interface- ClusterNode
- Returns:
- Collection of addresses.
 
 - 
hostNamespublic Collection<String> hostNames() Gets collection of host names this node is known by.If IgniteConfiguration.getLocalHost()value isn'tnullnode will try to use the host name of that resolved address for all communications and returned collection will contain only that host name. If that host name can not be resolved then ip address returned by methodClusterNode.addresses()is used.If IgniteConfiguration.getLocalHost()value isnullthen local wildcard address will be used, and this method returns host names of all addresses of that node.Note: the loopback address will be omitted in results. - Specified by:
- hostNamesin interface- ClusterNode
- Returns:
- Collection of host names.
 
 - 
orderpublic long order() Node order within grid topology. Discovery SPIs that support node ordering will assign a proper order to each node and will guarantee that discovery event notifications for new nodes will come in proper order. All other SPIs not supporting ordering may choose to return node startup time here.NOTE: in cases when discovery SPI doesn't support ordering Ignite cannot guarantee that orders on all nodes will be unique or chronologically correct. If such guarantee is required - make sure use discovery SPI that provides ordering. - Specified by:
- orderin interface- ClusterNode
- Returns:
- Node startup order.
 
 - 
versionpublic IgniteProductVersion version() Gets node version.- Specified by:
- versionin interface- ClusterNode
- Returns:
- Node version.
 
 - 
isLocalpublic boolean isLocal() Tests whether or not this node is a local node.- Specified by:
- isLocalin interface- ClusterNode
- Returns:
- Trueif this node is a local node,- falseotherwise.
 
 - 
isClientpublic boolean isClient() Whether this node is cache client (seeIgniteConfiguration.isClientMode()).- Specified by:
- isClientin interface- ClusterNode
- Returns:
- True if client.
- See Also:
- IgniteConfiguration.isClientMode()
 
 - 
setConsistentIdpublic void setConsistentId(Serializable consistentId) Sets consistent globally unique node ID which survives node restarts.- Specified by:
- setConsistentIdin interface- org.apache.ignite.internal.managers.discovery.IgniteClusterNode
- Parameters:
- consistentId- Consistent globally unique node ID.
 
 - 
setMetricspublic void setMetrics(ClusterMetrics metrics) Sets node metrics.- Specified by:
- setMetricsin interface- org.apache.ignite.internal.managers.discovery.IgniteClusterNode
- Parameters:
- metrics- Node metrics.
 
 - 
cacheMetricspublic Map<Integer,CacheMetrics> cacheMetrics() Gets collections of cache metrics for this node. Note that node cache metrics are constantly updated and provide up to date information about caches.Cache metrics are updated with some delay which is directly related to metrics update frequency. For example, by default the update will happen every 2seconds.- Specified by:
- cacheMetricsin interface- org.apache.ignite.internal.managers.discovery.IgniteClusterNode
- Returns:
- Runtime metrics snapshots for this node.
 
 - 
setCacheMetricspublic void setCacheMetrics(Map<Integer,CacheMetrics> cacheMetrics) Sets node cache metrics.- Specified by:
- setCacheMetricsin interface- org.apache.ignite.internal.managers.discovery.IgniteClusterNode
- Parameters:
- cacheMetrics- Cache metrics.
 
 
- 
 
-