Skip to content

Commit ddbc5bd

Browse files
author
S.Vladykin
committed
Merge branch 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-341
2 parents 5066aea + 676a568 commit ddbc5bd

File tree

8 files changed

+146
-74
lines changed

8 files changed

+146
-74
lines changed

modules/core/src/main/java/org/apache/ignite/events/CacheEvent.java

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
package org.apache.ignite.events;
1919

20+
import org.apache.ignite.IgniteEvents;
2021
import org.apache.ignite.cluster.*;
22+
import org.apache.ignite.configuration.IgniteConfiguration;
2123
import org.apache.ignite.internal.util.tostring.*;
2224
import org.apache.ignite.internal.util.typedef.internal.*;
2325
import org.apache.ignite.lang.*;
@@ -33,40 +35,47 @@
3335
* APIs for performing a distributed queries across multiple nodes:
3436
* <ul>
3537
* <li>
36-
* {@link org.apache.ignite.IgniteEvents#remoteQuery(org.apache.ignite.lang.IgnitePredicate, long, int...)} -
38+
* {@link IgniteEvents#remoteQuery(IgnitePredicate, long, int...)} -
3739
* asynchronously querying events occurred on the nodes specified, including remote nodes.
3840
* </li>
3941
* <li>
40-
* {@link org.apache.ignite.IgniteEvents#localQuery(org.apache.ignite.lang.IgnitePredicate, int...)} -
42+
* {@link IgniteEvents#localQuery(IgnitePredicate, int...)} -
4143
* querying only local events stored on this local node.
4244
* </li>
4345
* <li>
44-
* {@link org.apache.ignite.IgniteEvents#localListen(org.apache.ignite.lang.IgnitePredicate, int...)} -
46+
* {@link IgniteEvents#localListen(IgnitePredicate, int...)} -
4547
* listening to local grid events (events from remote nodes not included).
4648
* </li>
4749
* </ul>
48-
* User can also wait for events using method {@link org.apache.ignite.IgniteEvents#waitForLocal(org.apache.ignite.lang.IgnitePredicate, int...)}.
50+
* User can also wait for events using method {@link IgniteEvents#waitForLocal(IgnitePredicate, int...)}.
4951
* <h1 class="header">Events and Performance</h1>
5052
* Note that by default all events in Ignite are enabled and therefore generated and stored
5153
* by whatever event storage SPI is configured. Ignite can and often does generate thousands events per seconds
5254
* under the load and therefore it creates a significant additional load on the system. If these events are
5355
* not needed by the application this load is unnecessary and leads to significant performance degradation.
5456
* <p>
5557
* It is <b>highly recommended</b> to enable only those events that your application logic requires
56-
* by using {@link org.apache.ignite.configuration.IgniteConfiguration#getIncludeEventTypes()} method in Ignite configuration. Note that certain
58+
* by using {@link IgniteConfiguration#getIncludeEventTypes()} method in Ignite configuration. Note that certain
5759
* events are required for Ignite's internal operations and such events will still be generated but not stored by
5860
* event storage SPI if they are disabled in Ignite configuration.
61+
*
62+
* @see EventType#EVT_CACHE_STARTED
63+
* @see EventType#EVT_CACHE_STOPPED
64+
* @see EventType#EVT_CACHE_NODES_LEFT
65+
* @see EventType#EVTS_CACHE_LIFECYCLE
5966
* @see EventType#EVT_CACHE_ENTRY_CREATED
6067
* @see EventType#EVT_CACHE_ENTRY_DESTROYED
6168
* @see EventType#EVT_CACHE_ENTRY_EVICTED
69+
* @see EventType#EVT_CACHE_OBJECT_EXPIRED
70+
* @see EventType#EVT_CACHE_OBJECT_FROM_OFFHEAP
71+
* @see EventType#EVT_CACHE_OBJECT_LOCKED
6272
* @see EventType#EVT_CACHE_OBJECT_PUT
6373
* @see EventType#EVT_CACHE_OBJECT_READ
6474
* @see EventType#EVT_CACHE_OBJECT_REMOVED
65-
* @see EventType#EVT_CACHE_OBJECT_LOCKED
66-
* @see EventType#EVT_CACHE_OBJECT_UNLOCKED
6775
* @see EventType#EVT_CACHE_OBJECT_SWAPPED
76+
* @see EventType#EVT_CACHE_OBJECT_UNLOCKED
6877
* @see EventType#EVT_CACHE_OBJECT_UNSWAPPED
69-
* @see EventType#EVT_CACHE_OBJECT_EXPIRED
78+
* @see EventType#EVTS_CACHE
7079
*/
7180
public class CacheEvent extends EventAdapter {
7281
/** */

modules/core/src/main/java/org/apache/ignite/events/CacheRebalancingEvent.java

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717

1818
package org.apache.ignite.events;
1919

20+
import org.apache.ignite.IgniteEvents;
2021
import org.apache.ignite.cluster.*;
22+
import org.apache.ignite.configuration.IgniteConfiguration;
2123
import org.apache.ignite.internal.util.typedef.internal.*;
24+
import org.apache.ignite.lang.IgnitePredicate;
2225

2326
/**
2427
* In-memory database (cache) rebalancing event. Rebalance event happens every time there is a change
@@ -29,34 +32,34 @@
2932
* APIs for performing a distributed queries across multiple nodes:
3033
* <ul>
3134
* <li>
32-
* {@link org.apache.ignite.IgniteEvents#remoteQuery(org.apache.ignite.lang.IgnitePredicate, long, int...)} -
35+
* {@link IgniteEvents#remoteQuery(IgnitePredicate, long, int...)} -
3336
* asynchronously querying events occurred on the nodes specified, including remote nodes.
3437
* </li>
3538
* <li>
36-
* {@link org.apache.ignite.IgniteEvents#localQuery(org.apache.ignite.lang.IgnitePredicate, int...)} -
39+
* {@link IgniteEvents#localQuery(IgnitePredicate, int...)} -
3740
* querying only local events stored on this local node.
3841
* </li>
3942
* <li>
40-
* {@link org.apache.ignite.IgniteEvents#localListen(org.apache.ignite.lang.IgnitePredicate, int...)} -
43+
* {@link IgniteEvents#localListen(IgnitePredicate, int...)} -
4144
* listening to local grid events (events from remote nodes not included).
4245
* </li>
4346
* </ul>
44-
* User can also wait for events using method {@link org.apache.ignite.IgniteEvents#waitForLocal(org.apache.ignite.lang.IgnitePredicate, int...)}.
47+
* User can also wait for events using method {@link IgniteEvents#waitForLocal(IgnitePredicate, int...)}.
4548
* <h1 class="header">Events and Performance</h1>
4649
* Note that by default all events in Ignite are enabled and therefore generated and stored
4750
* by whatever event storage SPI is configured. Ignite can and often does generate thousands events per seconds
4851
* under the load and therefore it creates a significant additional load on the system. If these events are
4952
* not needed by the application this load is unnecessary and leads to significant performance degradation.
5053
* <p>
5154
* It is <b>highly recommended</b> to enable only those events that your application logic requires
52-
* by using {@link org.apache.ignite.configuration.IgniteConfiguration#getIncludeEventTypes()} method in Ignite configuration. Note that certain
55+
* by using {@link IgniteConfiguration#getIncludeEventTypes()} method in Ignite configuration. Note that certain
5356
* events are required for Ignite's internal operations and such events will still be generated but not stored by
5457
* event storage SPI if they are disabled in Ignite configuration.
5558
* @see EventType#EVT_CACHE_REBALANCE_PART_LOADED
5659
* @see EventType#EVT_CACHE_REBALANCE_PART_UNLOADED
5760
* @see EventType#EVT_CACHE_REBALANCE_STARTED
5861
* @see EventType#EVT_CACHE_REBALANCE_STOPPED
59-
* @see EventType#EVT_CACHE_REBALANCE_DATA_LOST
62+
* @see EventType#EVT_CACHE_REBALANCE_PART_DATA_LOST
6063
*/
6164
public class CacheRebalancingEvent extends EventAdapter {
6265
/** */
@@ -89,8 +92,16 @@ public class CacheRebalancingEvent extends EventAdapter {
8992
* @param discoEvtType Discovery event type that triggered this rebalancing event.
9093
* @param discoTs Timestamp of discovery event that triggered this rebalancing event.
9194
*/
92-
public CacheRebalancingEvent(String cacheName, ClusterNode node, String msg, int type, int part,
93-
ClusterNode discoNode, int discoEvtType, long discoTs) {
95+
public CacheRebalancingEvent(
96+
String cacheName,
97+
ClusterNode node,
98+
String msg,
99+
int type,
100+
int part,
101+
ClusterNode discoNode,
102+
int discoEvtType,
103+
long discoTs
104+
) {
94105
super(node, msg, type);
95106
this.cacheName = cacheName;
96107
this.part = part;

0 commit comments

Comments
 (0)