Package org.apache.ignite.events
Class CacheRebalancingEvent
- java.lang.Object
- 
- org.apache.ignite.events.EventAdapter
- 
- org.apache.ignite.events.CacheRebalancingEvent
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Event>,- Event
 
 public class CacheRebalancingEvent extends EventAdapter In-memory database (cache) rebalancing event. Rebalance event happens every time there is a change in grid topology, which means that a node has either joined or left the grid.Grid events are used for notification about what happens within the grid. Note that by design Ignite keeps all events generated on the local node locally and it provides APIs for performing a distributed queries across multiple nodes: - 
          IgniteEvents.remoteQuery(IgnitePredicate, long, int...)- asynchronously querying events occurred on the nodes specified, including remote nodes.
- 
          IgniteEvents.localQuery(IgnitePredicate, int...)- querying only local events stored on this local node.
- 
          IgniteEvents.localListen(IgnitePredicate, int...)- listening to local grid events (events from remote nodes not included).
 IgniteEvents.waitForLocal(IgnitePredicate, int...).Events and PerformanceNote that by default all events in Ignite are enabled and therefore generated and stored by whatever event storage SPI is configured. Ignite can and often does generate thousands events per seconds under the load and therefore it creates a significant additional load on the system. If these events are not needed by the application this load is unnecessary and leads to significant performance degradation.It is highly recommended to enable only those events that your application logic requires by using IgniteConfiguration.getIncludeEventTypes()method in Ignite configuration. Note that certain events are required for Ignite's internal operations and such events will still be generated but not stored by event storage SPI if they are disabled in Ignite configuration.- See Also:
- EventType.EVT_CACHE_REBALANCE_PART_LOADED,- EventType.EVT_CACHE_REBALANCE_PART_UNLOADED,- EventType.EVT_CACHE_REBALANCE_STARTED,- EventType.EVT_CACHE_REBALANCE_STOPPED,- EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST,- EventType.EVT_CACHE_REBALANCE_PART_SUPPLIED,- EventType.EVT_CACHE_REBALANCE_PART_MISSED, Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description CacheRebalancingEvent(String cacheName, ClusterNode node, String msg, int type, int part, ClusterNode discoNode, int discoEvtType, long discoTs)Constructs cache event.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcacheName()Gets cache name.StringdiscoveryEventName()Gets name of discovery event that triggered this rebalancing event.intdiscoveryEventType()Gets type of discovery event that triggered this rebalancing event.ClusterNodediscoveryNode()Gets shadow of the node that triggered this rebalancing event.longdiscoveryTimestamp()Gets timestamp of discovery event that caused this rebalancing event.intpartition()Gets partition for the event.StringshortDisplay()Gets a shortened version oftoString()result.StringtoString()
 
- 
- 
- 
Constructor Detail- 
CacheRebalancingEventpublic CacheRebalancingEvent(String cacheName, ClusterNode node, String msg, int type, int part, ClusterNode discoNode, int discoEvtType, long discoTs) Constructs cache event.- Parameters:
- cacheName- Cache name.
- node- Event node.
- msg- Event message.
- type- Event type.
- part- Partition for the event (usually the partition the key belongs to).
- discoNode- Node that triggered this rebalancing event.
- discoEvtType- Discovery event type that triggered this rebalancing event.
- discoTs- Timestamp of discovery event that triggered this rebalancing event.
 
 
- 
 - 
Method Detail- 
cacheNamepublic String cacheName() Gets cache name.- Returns:
- Cache name.
 
 - 
partitionpublic int partition() Gets partition for the event.- Returns:
- Partition for the event.
 
 - 
discoveryNodepublic ClusterNode discoveryNode() Gets shadow of the node that triggered this rebalancing event.- Returns:
- Shadow of the node that triggered this rebalancing event.
 
 - 
discoveryEventTypepublic int discoveryEventType() Gets type of discovery event that triggered this rebalancing event.- Returns:
- Type of discovery event that triggered this rebalancing event.
- See Also:
- EventAdapter.type()
 
 - 
discoveryEventNamepublic String discoveryEventName() Gets name of discovery event that triggered this rebalancing event.- Returns:
- Name of discovery event that triggered this rebalancing event.
- See Also:
- EventAdapter.name()
 
 - 
discoveryTimestamppublic long discoveryTimestamp() Gets timestamp of discovery event that caused this rebalancing event.- Returns:
- Timestamp of discovery event that caused this rebalancing event.
 
 - 
shortDisplaypublic String shortDisplay() Gets a shortened version oftoString()result. Suitable for humans to read.- Specified by:
- shortDisplayin interface- Event
- Overrides:
- shortDisplayin class- EventAdapter
- Returns:
- Shortened version of toString()result.
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- EventAdapter
 
 
- 
 
-