public class CacheGroupContext extends Object
| Constructor and Description |
|---|
CacheGroupContext(GridCacheSharedContext ctx,
int grpId,
UUID rcvdFrom,
CacheType cacheType,
CacheConfiguration ccfg,
boolean affNode,
DataRegion dataRegion,
CacheObjectContext cacheObjCtx,
FreeList freeList,
ReuseList reuseList,
AffinityTopologyVersion locStartVer,
boolean persistenceEnabled,
boolean walEnabled,
boolean recoveryMode) |
public CacheGroupContext(GridCacheSharedContext ctx, int grpId, UUID rcvdFrom, CacheType cacheType, CacheConfiguration ccfg, boolean affNode, DataRegion dataRegion, CacheObjectContext cacheObjCtx, FreeList freeList, ReuseList reuseList, AffinityTopologyVersion locStartVer, boolean persistenceEnabled, boolean walEnabled, boolean recoveryMode)
ctx - Context.grpId - Group ID.rcvdFrom - Node ID cache group was received from.cacheType - Cache type.ccfg - Cache configuration.affNode - Affinity node flag.dataRegion - data region.cacheObjCtx - Cache object context.freeList - Free list.reuseList - Reuse list.locStartVer - Topology version when group was started on local node.persistenceEnabled - Persistence enabled flag.walEnabled - Wal enabled flag.public boolean mvccEnabled()
public boolean systemCache()
True if this is cache group for one of system caches.public UUID receivedFrom()
public boolean storeCacheIdInDataPage()
True if cacheId should be stored in data pages.public boolean deploymentEnabled()
True if deployment is enabled.public GridCachePreloader preloader()
public byte ioPolicy()
public boolean hasCache(String cacheName)
cacheName - Cache name.True if group contains cache with given name.public GridCacheContext singleCacheContext()
public void unwindUndeploys()
public boolean eventRecordable(int type)
type - Event type to check.True if given event type should be recorded.public boolean userCache()
True if cache created by user.public void addRebalanceEvent(int part,
int type,
ClusterNode discoNode,
int discoType,
long discoTs)
part - Partition.type - Event type.discoNode - Discovery node.discoType - Discovery event type.discoTs - Discovery event timestamp.public void addUnloadEvent(int part)
part - Partition.public void addRebalanceSupplyEvent(int part)
part - Partition.public void addRebalanceMissEvent(int part)
part - Partition.public void addCacheEvent(int part,
KeyCacheObject key,
UUID evtNodeId,
int type,
@Nullable
@Nullable CacheObject newVal,
boolean hasNewVal,
@Nullable
@Nullable CacheObject oldVal,
boolean hasOldVal,
boolean keepBinary)
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.public boolean queriesEnabled()
True if contains cache with query indexing enabled.public boolean isDrEnabled()
True in case replication is enabled.public FreeList freeList()
public ReuseList reuseList()
public CacheObjectContext cacheObjectContext()
public GridCacheSharedContext shared()
public DataRegion dataRegion()
public boolean affinityNode()
True if local node is affinity node.public GridDhtPartitionTopology topology()
public boolean isTopologyLocked()
True if current thread holds lock on topology.public IgniteCacheOffheapManager offheap()
public AffinityTopologyVersion localStartVersion()
public boolean isLocal()
True if cache is local.public boolean isReplicated()
True if cache is local.public CacheConfiguration config()
public IgnitePredicate<ClusterNode> nodeFilter()
@Nullable public @Nullable TopologyValidator topologyValidator()
public AffinityFunction affinityFunction()
public GridAffinityAssignmentCache affinity()
@Nullable public @Nullable String name()
null if group name was not specified for cache.public String cacheOrGroupName()
public static String cacheOrGroupName(CacheConfiguration<?,?> ccfg)
public int groupId()
public boolean sharedGroup()
True if group can contain multiple caches.public void onKernalStop()
public void finishRecovery(AffinityTopologyVersion startVer, UUID originalReceivedFrom, boolean affinityNode) throws IgniteCheckedException
startVer - Cache group start version.originalReceivedFrom - UUID of node that was first who initiated cache group creating.
This is needed to decide should node calculate affinity locally or fetch from other nodes.affinityNode - Flag indicates, is local node affinity node or not. This may be calculated only after node joined to topology.IgniteCheckedException - If failed.public boolean isRecoveryMode()
True if current cache group is in recovery mode.public List<GridCacheContext> caches()
public boolean hasCaches()
True if group contains caches.public void onPartitionEvicted(int part)
part - Partition ID.public void addCacheWithContinuousQuery(GridCacheContext cctx)
cctx - Cache context.public void removeCacheWithContinuousQuery(GridCacheContext cctx)
cctx - Cache context.public ReadWriteLock listenerLock()
public void onPartitionCounterUpdate(int cacheId,
int part,
long cntr,
AffinityTopologyVersion topVer,
boolean primary)
cacheId - ID of cache initiated counter update.part - Partition number.cntr - Counter.topVer - Topology version for current operation.public boolean hasContinuousQueryCaches()
True if there is at least one cache with registered CQ exists in this group.public void start()
throws IgniteCheckedException
IgniteCheckedException - If failed.public boolean persistenceEnabled()
public void onDisconnected(IgniteFuture reconnectFut)
reconnectFut - Reconnect future.public boolean rebalanceEnabled()
True if rebalance is enabled.public void onReconnected()
public boolean walEnabled()
public boolean localWalEnabled()
False if a durability (WAL logging) is disabled for a group until rebalancing has finished.public boolean globalWalEnabled()
public void globalWalEnabled(boolean enabled)
enabled - Global WAL enabled flag.public void localWalEnabled(boolean enabled,
boolean persist)
enabled - Local WAL enabled flag.persist - If true then flag state will be persisted into metastorage.public IoStatisticsHolder statisticsHolderIdx()
public IoStatisticsHolder statisticsHolderData()
public boolean hasAtomicCaches()
True if group has atomic caches.public CacheGroupMetricsImpl metrics()
public void removeIOStatistic(boolean destroy)
destroy - Group destroy flag.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021