public class GridCacheMvccManager extends GridCacheSharedManagerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
globalAtomicCnt
Global atomic id counter.
|
protected static int |
THREAD_RESERVE_SIZE
Maxim number of atomic IDs for thread.
|
cctx, diagnosticLog, log| Constructor and Description |
|---|
GridCacheMvccManager() |
context, isStopping, kernalStartInfo, kernalStopInfo, log, onKernalStop, onReconnected, start, startInfo, stop, stop0, stopInfo, toStringprotected static final int THREAD_RESERVE_SIZE
protected final AtomicLong globalAtomicCnt
protected void start0()
throws IgniteCheckedException
start0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.public GridCacheLockCallback callback()
public Collection<GridCacheExplicitLockSpan> activeExplicitLocks()
public Collection<GridCacheFuture<?>> activeFutures()
public void removeExplicitNodeLocks(UUID leftNodeId, AffinityTopologyVersion topVer)
leftNodeId - Left node ID.topVer - Topology version.public void mapVersion(GridCacheVersion from, GridCacheVersion to)
from - From version.to - To version.public GridCacheVersion mappedVersion(GridCacheVersion from)
from - Near version.public void onStop()
public void onDisconnected(IgniteFuture reconnectFut)
onDisconnected in interface GridCacheSharedManageronDisconnected in class GridCacheSharedManagerAdapterreconnectFut - Reconnect future.public GridCacheVersion unmapVersion(GridCacheVersion from)
from - From version.public boolean addAtomicFuture(long futId,
GridCacheAtomicFuture<?> fut)
futId - Future ID.fut - Future.False if future was forcibly completed with error.public Collection<GridCacheAtomicFuture<?>> atomicFutures()
public int atomicFuturesCount()
public Collection<org.apache.ignite.internal.processors.cache.GridCacheMvccManager.DataStreamerFuture> dataStreamerFutures()
@Nullable public IgniteInternalFuture<?> atomicFuture(long futId)
futId - Future ID.@Nullable public IgniteInternalFuture<?> removeAtomicFuture(long futId)
futId - Future ID.public boolean addFuture(GridCacheFuture<?> fut, IgniteUuid futId)
fut - Future.futId - Future ID.True if added.public GridFutureAdapter addDataStreamerFuture(AffinityTopologyVersion topVer)
topVer - Topology version.public boolean addFuture(GridCacheVersionedFuture<?> fut)
fut - Future.True if added.public void removeFuture(IgniteUuid futId)
futId - Future ID.public boolean removeVersionedFuture(GridCacheVersionedFuture<?> fut)
fut - Future to remove.True if removed.@Nullable public GridCacheVersionedFuture<?> versionedFuture(GridCacheVersion ver, IgniteUuid futId)
ver - Lock ID.futId - Future ID.@Nullable public Collection<GridCacheVersionedFuture<?>> futuresForVersion(GridCacheVersion ver)
ver - Lock ID.@Nullable public GridCacheFuture future(IgniteUuid futId)
futId - Future ID.public boolean isRemoved(GridCacheContext cacheCtx, GridCacheVersion ver)
cacheCtx - Cache context.ver - Lock version to check.True if lock had been removed.public boolean addRemoved(GridCacheContext cacheCtx, GridCacheVersion ver)
cacheCtx - Cache context.ver - Obsolete entry version.True if added.public Collection<IgniteTxKey> lockedKeys()
public Collection<IgniteTxKey> nearLockedKeys()
public Collection<GridCacheMvccCandidate> remoteCandidates()
DGC.public Collection<GridCacheMvccCandidate> localCandidates()
DGC.public boolean addNext(GridCacheContext cacheCtx, GridCacheMvccCandidate cand)
cacheCtx - Cache context.cand - Cache lock candidate to add.True if added as a result of this operation,
false if was previously added.public void contextReset()
public void addExplicitLock(long threadId,
GridCacheMvccCandidate cand,
AffinityTopologyVersion topVer)
threadId - Thread ID.cand - Candidate to add.topVer - Topology version.public void removeExplicitLock(GridCacheMvccCandidate cand)
cand - Candidate to remove.public boolean isLockedByThread(IgniteTxKey key, long threadId)
key - Key to check.threadId - Thread id. If -1, all threads will be checked.True if locked by any or given thread (depending on threadId value).public void markExplicitOwner(IgniteTxKey key, long threadId)
key - Key.threadId - Thread id.public GridCacheMvccCandidate removeExplicitLock(long threadId, IgniteTxKey key, @Nullable GridCacheVersion ver)
threadId - Thread id.key - Key.ver - Optional version.@Nullable public GridCacheMvccCandidate explicitLock(long threadId, IgniteTxKey key)
threadId - Thread id.key - Key to look up.null if
no such candidate.@Nullable public GridCacheMvccCandidate explicitLock(IgniteTxKey key, @Nullable GridCacheVersion ver)
key - Key.ver - Version.null if no such candidate.@Nullable public AffinityTopologyVersion lastExplicitLockTopologyVersion(long threadId)
threadId - Thread ID.public void printMemoryStats()
printMemoryStats in interface GridCacheSharedManagerprintMemoryStats in class GridCacheSharedManagerAdapterpublic IgniteInternalFuture<?> finishLocks(AffinityTopologyVersion topVer)
topVer - Topology version.public Map<IgniteTxKey,Collection<GridCacheMvccCandidate>> unfinishedLocks(AffinityTopologyVersion topVer)
topVer - Topology version.public IgniteInternalFuture<?> finishExplicitLocks(AffinityTopologyVersion topVer)
topVer - Topology version to wait for.public IgniteInternalFuture<?> finishAtomicUpdates(AffinityTopologyVersion topVer)
topVer - Topology version to finish.public IgniteInternalFuture<?> finishDataStreamerUpdates(AffinityTopologyVersion topVer)
public IgniteInternalFuture<?> finishKeys(Collection<KeyCacheObject> keys, int cacheId, AffinityTopologyVersion topVer)
keys - Key for which locks should be released.cacheId - Cache ID.topVer - Topology version.public void recheckPendingLocks()
public long nextAtomicId()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018