org.apache.ignite.internal.processors.cache

## Class GridCacheEventManager

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheEventManager

All Implemented Interfaces:
  GridCacheManager

    public class GridCacheEventManager
    extends GridCacheManagerAdapter

Cache event manager.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`cctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheEventManager()`

### Method Summary

Methods
`void` `addEvent(int type)`
`void` `addEvent(int part, KeyCacheObject key, IgniteInternalTx tx, GridCacheMvccCandidate owner, int type, CacheObject newVal, boolean hasNewVal, CacheObject oldVal, boolean hasOldVal, UUID subjId, String cloClsName, String taskName, boolean keepBinary)`
`void` `addEvent(int part, KeyCacheObject key, UUID evtNodeId, GridCacheMvccCandidate owner, int type, CacheObject newVal, boolean hasNewVal, CacheObject oldVal, boolean hasOldVal, UUID subjId, String cloClsName, String taskName, boolean keepBinary)`
`void` `addEvent(int part, KeyCacheObject key, UUID nodeId, IgniteInternalTx tx, GridCacheMvccCandidate owner, int type, CacheObject newVal, boolean hasNewVal, CacheObject oldVal, boolean hasOldVal, UUID subjId, String cloClsName, String taskName, boolean keepBinary)`
`void` `addEvent(int part, KeyCacheObject key, UUID evtNodeId, IgniteUuid xid, Object lockId, int type, CacheObject newVal, boolean hasNewVal, CacheObject oldVal, boolean hasOldVal, UUID subjId, String cloClsName, String taskName, boolean keepBinary)`
`void` `addListener(GridLocalEventListener lsnr, int... evts)` Adds local event listener.
`void` `addPreloadEvent(int part, int type, ClusterNode discoNode, int discoType, long discoTs)` Adds preloading event.
`void` `addUnloadEvent(int part)` Adds partition unload event.
`boolean` `isRecordable(int type)`
`void` `printMemoryStats()` Prints memory statistics (sizes of internal data structures, etc.).
`void` `removeListener(GridLocalEventListener lsnr)` Removes local event listener.

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter

`context, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, start, start0, startInfo, stop, stop0, stopInfo, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### GridCacheEventManager

    public GridCacheEventManager()

### Method Detail

#### addListener

    public void addListener(GridLocalEventListener lsnr,
                   int... evts)

Adds local event listener.

Parameters:
  `lsnr` - Listener.
  `evts` - Types of events.

#### removeListener

    public void removeListener(GridLocalEventListener lsnr)

Removes local event listener.

Parameters:
  `lsnr` - Local event listener.

#### addEvent

    public void addEvent(int part,
                KeyCacheObject key,
                IgniteInternalTx tx,
                @Nullable
                GridCacheMvccCandidate owner,
                int type,
                @Nullable
                CacheObject newVal,
                boolean hasNewVal,
                @Nullable
                CacheObject oldVal,
                boolean hasOldVal,
                UUID subjId,
                String cloClsName,
                String taskName,
                boolean keepBinary)

Parameters:
  `part` - Partition.
  `key` - Key for the event.
  `tx` - Possible surrounding transaction.
  `owner` - Possible surrounding lock.
  `type` - Event type.
  `newVal` - New value.
  `hasNewVal` - Whether new value is present or not.
  `oldVal` - Old value.
  `hasOldVal` - Whether old value is present or not.
  `subjId` - Subject ID.
  `cloClsName` - Closure class name.
  `taskName` - Task name.

#### addEvent

    public void addEvent(int type)

Parameters:
  `type` - Event type (start or stop).

#### addEvent

    public void addEvent(int part,
                KeyCacheObject key,
                UUID nodeId,
                IgniteInternalTx tx,
                GridCacheMvccCandidate owner,
                int type,
                CacheObject newVal,
                boolean hasNewVal,
                CacheObject oldVal,
                boolean hasOldVal,
                UUID subjId,
                String cloClsName,
                String taskName,
                boolean keepBinary)

Parameters:
  `part` - Partition.
  `key` - Key for the event.
  `nodeId` - Node ID.
  `tx` - Possible surrounding transaction.
  `owner` - Possible surrounding lock.
  `type` - Event type.
  `newVal` - New value.
  `hasNewVal` - Whether new value is present or not.
  `oldVal` - Old value.
  `hasOldVal` - Whether old value is present or not.
  `subjId` - Subject ID.
  `cloClsName` - Closure class name.
  `taskName` - Task name.

#### addEvent

    public void addEvent(int part,
                KeyCacheObject key,
                UUID evtNodeId,
                @Nullable
                GridCacheMvccCandidate owner,
                int type,
                @Nullable
                CacheObject newVal,
                boolean hasNewVal,
                CacheObject oldVal,
                boolean hasOldVal,
                UUID subjId,
                String cloClsName,
                String taskName,
                boolean keepBinary)

Parameters:
  `part` - Partition.
  `key` - Key for the event.
  `evtNodeId` - Node ID.
  `owner` - Possible surrounding lock.
  `type` - Event type.
  `newVal` - New value.
  `hasNewVal` - Whether new value is present or not.
  `oldVal` - Old value.
  `hasOldVal` - Whether old value is present or not.
  `subjId` - Subject ID.
  `cloClsName` - Closure class name.
  `taskName` - Task name.

#### addEvent

    public void addEvent(int part,
                KeyCacheObject key,
                UUID evtNodeId,
                @Nullable
                IgniteUuid xid,
                @Nullable
                Object lockId,
                int type,
                @Nullable
                CacheObject newVal,
                boolean hasNewVal,
                @Nullable
                CacheObject oldVal,
                boolean hasOldVal,
                UUID subjId,
                @Nullable
                String cloClsName,
                @Nullable
                String taskName,
                boolean keepBinary)

Parameters:
  `part` - Partition.
  `key` - Key for the event.
  `evtNodeId` - Event node ID.
  `xid` - Transaction ID.
  `lockId` - Lock ID.
  `type` - Event type.
  `newVal` - New value.
  `hasNewVal` - Whether new value is present or not.
  `oldVal` - Old value.
  `hasOldVal` - Whether old value is present or not.
  `subjId` - Subject ID.
  `cloClsName` - Closure class name.
  `taskName` - Task class name.

#### addPreloadEvent

    public void addPreloadEvent(int part,
                       int type,
                       ClusterNode discoNode,
                       int discoType,
                       long discoTs)

Adds preloading event.

Parameters:
  `part` - Partition.
  `type` - Event type.
  `discoNode` - Discovery node.
  `discoType` - Discovery event type.
  `discoTs` - Discovery event timestamp.

#### addUnloadEvent

    public void addUnloadEvent(int part)

Adds partition unload event.

Parameters:
  `part` - Partition.

#### isRecordable

    public boolean isRecordable(int type)

Parameters:
  `type` - Event type.
Returns:
  `True` if event is recordable.

#### printMemoryStats

    public void printMemoryStats()

Prints memory statistics (sizes of internal data structures, etc.). NOTE: this method is for testing and profiling purposes only.

Specified by:
  `printMemoryStats` in interface `GridCacheManager`
Overrides:
  `printMemoryStats` in class `GridCacheManagerAdapter`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016