org.apache.ignite.internal.processors.cache

## Class CacheGroupContext

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.CacheGroupContext

    public class CacheGroupContext
    extends Object

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addCacheEvent(int part, KeyCacheObject key, UUID evtNodeId, int type, CacheObject newVal, boolean hasNewVal, CacheObject oldVal, boolean hasOldVal, boolean keepBinary)`
`void` `addCacheWithContinuousQuery(GridCacheContext cctx)`
`void` `addRebalanceEvent(int part, int type, ClusterNode discoNode, int discoType, long discoTs)` Adds rebalancing event.
`void` `addUnloadEvent(int part)` Adds partition unload event.
`GridAffinityAssignmentCache` `affinity()`
`AffinityFunction` `affinityFunction()`
`boolean` `affinityNode()`
`boolean` `allowFastEviction()`
`Set<Integer>` `cacheIds()`
`CacheObjectContext` `cacheObjectContext()`
`String` `cacheOrGroupName()`
`List<GridCacheContext>` `caches()`
`CacheConfiguration` `config()`
`DataRegion` `dataRegion()`
`boolean` `deploymentEnabled()`
`boolean` `eventRecordable(int type)`
`GridDhtPartitionsEvictor` `evictor()`
`FreeList` `freeList()`
`boolean` `globalWalEnabled()`
`void` `globalWalEnabled(boolean enabled)`
`int` `groupId()`
`boolean` `hasCache(String cacheName)`
`byte` `ioPolicy()`
`boolean` `isDrEnabled()`
`boolean` `isLocal()`
`boolean` `isReplicated()`
`AffinityTopologyVersion` `localStartVersion()`
`boolean` `localWalEnabled()` Local WAL enabled flag.
`void` `localWalEnabled(boolean enabled)`
`CacheGroupMetricsMXBean` `mxBean()`
`String` `name()`
`boolean` `needsRecovery()`
`void` `needsRecovery(boolean needsRecovery)`
`IgnitePredicate<ClusterNode>` `nodeFilter()`
`IgniteCacheOffheapManager` `offheap()`
`void` `onDisconnected(IgniteFuture reconnectFut)`
`void` `onKernalStop()`
`void` `onPartitionCounterUpdate(int cacheId, int part, long cntr, AffinityTopologyVersion topVer, boolean primary)`
`void` `onPartitionEvicted(int part)`
`void` `onReconnected()`
`boolean` `persistenceEnabled()`
`GridCachePreloader` `preloader()`
`boolean` `queriesEnabled()`
`boolean` `rebalanceEnabled()`
`UUID` `receivedFrom()`
`void` `removeCacheWithContinuousQuery(GridCacheContext cctx)`
`ReuseList` `reuseList()`
`GridCacheSharedContext` `shared()`
`boolean` `sharedGroup()`
`GridCacheContext` `singleCacheContext()`
`void` `start()`
`boolean` `storeCacheIdInDataPage()`
`boolean` `systemCache()`
`GridDhtPartitionTopology` `topology()`
`TopologyValidator` `topologyValidator()`
`String` `toString()`
`void` `unwindUndeploys()`
`boolean` `walEnabled()` WAL enabled flag.

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

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

### Method Detail

#### systemCache

    public boolean systemCache()

Returns:
  `True` if this is cache group for one of system caches.

#### receivedFrom

    public UUID receivedFrom()

Returns:
  Node ID initiated cache group start.

#### storeCacheIdInDataPage

    public boolean storeCacheIdInDataPage()

Returns:
  `True` if cacheId should be stored in data pages.

#### deploymentEnabled

    public boolean deploymentEnabled()

Returns:
  `True` if deployment is enabled.

#### preloader

    public GridCachePreloader preloader()

Returns:
  Preloader.

#### evictor

    public GridDhtPartitionsEvictor evictor()

Returns:
  Partitions evictor.

#### ioPolicy

    public byte ioPolicy()

Returns:
  IO policy for the given cache group.

#### hasCache

    public boolean hasCache(String cacheName)

Parameters:
  `cacheName` - Cache name.
Returns:
  `True` if group contains cache with given name.

#### singleCacheContext

    public GridCacheContext singleCacheContext()

Returns:
  Cache context if group contains single cache.

#### unwindUndeploys

    public void unwindUndeploys()

#### eventRecordable

    public boolean eventRecordable(int type)

Parameters:
  `type` - Event type to check.
Returns:
  `True` if given event type should be recorded.

#### addRebalanceEvent

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

Adds rebalancing 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.

#### addCacheEvent

    public void addCacheEvent(int part,
                              KeyCacheObject key,
                              UUID evtNodeId,
                              int type,
                              @Nullable
                              CacheObject newVal,
                              boolean hasNewVal,
                              @Nullable
                              CacheObject oldVal,
                              boolean hasOldVal,
                              boolean keepBinary)

Parameters:
  `part` - Partition.
  `key` - Key.
  `evtNodeId` - Event node ID.
  `type` - Event type.
  `newVal` - New value.
  `hasNewVal` - Has new value flag.
  `oldVal` - Old values.
  `hasOldVal` - Has old value flag.
  `keepBinary` - Keep binary flag.

#### queriesEnabled

    public boolean queriesEnabled()

Returns:
  `True` if contains cache with query indexing enabled.

#### allowFastEviction

    public boolean allowFastEviction()

Returns:
  `True` if fast eviction is allowed.

#### isDrEnabled

    public boolean isDrEnabled()

Returns:
  `True` in case replication is enabled.

#### freeList

    public FreeList freeList()

Returns:
  Free List.

#### reuseList

    public ReuseList reuseList()

Returns:
  Reuse List.

#### cacheObjectContext

    public CacheObjectContext cacheObjectContext()

Returns:
  Cache object context.

#### shared

    public GridCacheSharedContext shared()

Returns:
  Cache shared context.

#### dataRegion

    public DataRegion dataRegion()

Returns:
  data region.

#### affinityNode

    public boolean affinityNode()

Returns:
  `True` if local node is affinity node.

#### topology

    public GridDhtPartitionTopology topology()

Returns:
  Topology.

#### offheap

    public IgniteCacheOffheapManager offheap()

Returns:
  Offheap manager.

#### needsRecovery

    public boolean needsRecovery()

Returns:
  Current cache state. Must only be modified during exchange.

#### needsRecovery

    public void needsRecovery(boolean needsRecovery)

Parameters:
  `needsRecovery` - Needs recovery flag.

#### localStartVersion

    public AffinityTopologyVersion localStartVersion()

Returns:
  Topology version when group was started on local node.

#### isLocal

    public boolean isLocal()

Returns:
  `True` if cache is local.

#### isReplicated

    public boolean isReplicated()

Returns:
  `True` if cache is local.

#### config

    public CacheConfiguration config()

Returns:
  Cache configuration.

#### nodeFilter

    public IgnitePredicate<ClusterNode> nodeFilter()

Returns:
  Cache node filter.

#### topologyValidator

    @Nullable
    public TopologyValidator topologyValidator()

Returns:
  Configured topology validator.

#### affinityFunction

    public AffinityFunction affinityFunction()

Returns:
  Configured affinity function.

#### affinity

    public GridAffinityAssignmentCache affinity()

Returns:
  Affinity.

#### name

    @Nullable
    public String name()

Returns:
  Group name or `null` if group name was not specified for cache.

#### cacheOrGroupName

    public String cacheOrGroupName()

Returns:
  Group name if it is specified, otherwise cache name.

#### groupId

    public int groupId()

Returns:
  Group ID.

#### sharedGroup

    public boolean sharedGroup()

Returns:
  `True` if group can contain multiple caches.

#### onKernalStop

    public void onKernalStop()

#### cacheIds

    public Set<Integer> cacheIds()

Returns:
  IDs of caches in this group.

#### caches

    public List<GridCacheContext> caches()

Returns:
  Caches in this group.

#### onPartitionEvicted

    public void onPartitionEvicted(int part)

Parameters:
  `part` - Partition ID.

#### addCacheWithContinuousQuery

    public void addCacheWithContinuousQuery(GridCacheContext cctx)

Parameters:
  `cctx` - Cache context.

#### removeCacheWithContinuousQuery

    public void removeCacheWithContinuousQuery(GridCacheContext cctx)

Parameters:
  `cctx` - Cache context.

#### onPartitionCounterUpdate

    public void onPartitionCounterUpdate(int cacheId,
                                         int part,
                                         long cntr,
                                         AffinityTopologyVersion topVer,
                                         boolean primary)

Parameters:
  `cacheId` - ID of cache initiated counter update.
  `part` - Partition number.
  `cntr` - Counter.
  `topVer` - Topology version for current operation.

#### start

    public void start()
               throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If failed.

#### persistenceEnabled

    public boolean persistenceEnabled()

Returns:
  Persistence enabled flag.

#### onDisconnected

    public void onDisconnected(IgniteFuture reconnectFut)

Parameters:
  `reconnectFut` - Reconnect future.

#### rebalanceEnabled

    public boolean rebalanceEnabled()

Returns:
  `True` if rebalance is enabled.

#### onReconnected

    public void onReconnected()

#### mxBean

    public CacheGroupMetricsMXBean mxBean()

Returns:
  MXBean.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### walEnabled

    public boolean walEnabled()

WAL enabled flag.

#### localWalEnabled

    public boolean localWalEnabled()

Local WAL enabled flag.

#### globalWalEnabled

    public boolean globalWalEnabled()

Returns:
  Global WAL enabled flag.

#### globalWalEnabled

    public void globalWalEnabled(boolean enabled)

Parameters:
  `enabled` - Global WAL enabled flag.

#### localWalEnabled

    public void localWalEnabled(boolean enabled)

Parameters:
  `enabled` - Local WAL enabled flag.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018