public class GridCacheMvccManager extends GridCacheSharedManagerAdapter
cctx, log| Constructor and Description |
|---|
GridCacheMvccManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAtomicFuture(GridCacheVersion futVer,
GridCacheAtomicFuture<?> fut) |
void |
addExplicitLock(long threadId,
GridCacheMvccCandidate cand,
GridDiscoveryTopologySnapshot snapshot)
Adds candidate to the list of near local candidates.
|
boolean |
addFuture(GridCacheFuture<?> fut)
Adds future.
|
boolean |
addLocal(GridCacheMvccCandidate cand) |
boolean |
addNext(GridCacheContext cacheCtx,
GridCacheMvccCandidate cand) |
boolean |
addRemoved(GridCacheContext cacheCtx,
GridCacheVersion ver) |
IgniteInternalFuture<?> |
atomicFuture(GridCacheVersion futVer)
Gets future by given future ID.
|
Collection<GridCacheAtomicFuture<?>> |
atomicFutures() |
GridCacheMvccCallback |
callback() |
void |
cancelClientFutures()
Cancels all client futures.
|
void |
contextReset()
Reset MVCC context.
|
GridCacheMvccCandidate |
explicitLock(KeyCacheObject key,
GridCacheVersion ver)
Gets explicit lock candidate added by any thread by given key and lock version.
|
GridCacheMvccCandidate |
explicitLock(long threadId,
KeyCacheObject key)
Gets last added explicit lock candidate by thread id and key.
|
IgniteInternalFuture<?> |
finishAtomicUpdates(long topVer) |
IgniteInternalFuture<?> |
finishExplicitLocks(long topVer)
Creates a future that will wait for all explicit locks acquired on given topology
version to be released.
|
IgniteInternalFuture<?> |
finishKeys(Collection<KeyCacheObject> keys,
long topVer) |
IgniteInternalFuture<?> |
finishLocks(long topVer) |
<T> GridCacheFuture<T> |
future(GridCacheVersion ver,
IgniteUuid futId)
Gets future for given future ID and lock ID.
|
<T> Collection<? extends IgniteInternalFuture<T>> |
futures(GridCacheVersion ver)
Gets all futures for given lock version, possibly empty collection.
|
boolean |
hasFuture(GridCacheFuture<?> fut) |
boolean |
isLockedByThread(KeyCacheObject key,
long threadId)
Checks if given key is locked by thread with given id or any thread.
|
boolean |
isRemoved(GridCacheContext cacheCtx,
GridCacheVersion ver) |
GridDiscoveryTopologySnapshot |
lastExplicitLockTopologySnapshot(long threadId) |
Collection<GridCacheMvccCandidate> |
localCandidates()
This method has poor performance, so use with care.
|
Collection<GridCacheVersion> |
localDhtPendingVersions(Collection<KeyCacheObject> keys,
GridCacheVersion base) |
GridCacheVersion |
mappedVersion(GridCacheVersion from) |
void |
mapVersion(GridCacheVersion from,
GridCacheVersion to) |
void |
markExplicitOwner(KeyCacheObject key,
long threadId)
Marks candidates for given thread and given key as owned.
|
void |
onKernalStart0() |
void |
onKernalStop0(boolean cancel) |
void |
printMemoryStats()
Prints memory statistics (sizes of internal data structures, etc.).
|
void |
recheckPendingLocks() |
Collection<GridCacheMvccCandidate> |
remoteCandidates()
This method has poor performance, so use with care.
|
IgniteInternalFuture<?> |
removeAtomicFuture(GridCacheVersion futVer) |
void |
removeExplicitLock(GridCacheMvccCandidate cand)
Removes candidate from the list of near local candidates.
|
GridCacheMvccCandidate |
removeExplicitLock(long threadId,
KeyCacheObject key,
GridCacheVersion ver)
Removes explicit lock for given thread id, key and optional version.
|
boolean |
removeFuture(GridCacheFuture<?> fut) |
boolean |
removeLocal(GridCacheMvccCandidate cand) |
protected void |
start0() |
GridCacheVersion |
unmapVersion(GridCacheVersion from) |
context, kernalStartInfo, kernalStopInfo, log, onKernalStart, onKernalStop, start, startInfo, stop, stop0, stopInfo, toStringprotected void start0()
throws IgniteCheckedException
start0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.public void onKernalStart0()
throws IgniteCheckedException
onKernalStart0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.public GridCacheMvccCallback callback()
public void mapVersion(GridCacheVersion from, GridCacheVersion to)
from - From version.to - To version.public GridCacheVersion mappedVersion(GridCacheVersion from)
from - Near version.public void cancelClientFutures()
public GridCacheVersion unmapVersion(GridCacheVersion from)
from - From version.public boolean hasFuture(GridCacheFuture<?> fut)
fut - Future to check.True if future is registered.public void addAtomicFuture(GridCacheVersion futVer, GridCacheAtomicFuture<?> fut)
futVer - Future ID.fut - Future.public Collection<GridCacheAtomicFuture<?>> atomicFutures()
@Nullable public IgniteInternalFuture<?> atomicFuture(GridCacheVersion futVer)
futVer - Future ID.@Nullable public IgniteInternalFuture<?> removeAtomicFuture(GridCacheVersion futVer)
futVer - Future ID.public boolean addFuture(GridCacheFuture<?> fut)
fut - Future.True if added.public boolean removeFuture(GridCacheFuture<?> fut)
fut - Future to remove.True if removed.@Nullable public <T> GridCacheFuture<T> future(GridCacheVersion ver, IgniteUuid futId)
ver - Lock ID.futId - Future ID.public <T> Collection<? extends IgniteInternalFuture<T>> futures(GridCacheVersion ver)
ver - Version.public boolean isRemoved(GridCacheContext cacheCtx, GridCacheVersion ver)
ver - Lock version to check.True if lock had been removed.public boolean addRemoved(GridCacheContext cacheCtx, GridCacheVersion ver)
ver - Obsolete entry version.True if added.public Collection<GridCacheMvccCandidate> remoteCandidates()
DGC.public Collection<GridCacheMvccCandidate> localCandidates()
DGC.public boolean addLocal(GridCacheMvccCandidate cand)
cand - Local lock.True if added.public boolean removeLocal(GridCacheMvccCandidate cand)
cand - Local candidate to remove.True if removed.public Collection<GridCacheVersion> localDhtPendingVersions(Collection<KeyCacheObject> keys, GridCacheVersion base)
keys - Keys.base - Base version.base whose keys are in the keys collection.public boolean addNext(GridCacheContext cacheCtx, GridCacheMvccCandidate cand)
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,
GridDiscoveryTopologySnapshot snapshot)
threadId - Thread ID.cand - Candidate to add.snapshot - Topology snapshot.public void removeExplicitLock(GridCacheMvccCandidate cand)
cand - Candidate to remove.public boolean isLockedByThread(KeyCacheObject 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(KeyCacheObject key, long threadId)
key - Key.threadId - Thread id.public GridCacheMvccCandidate removeExplicitLock(long threadId, KeyCacheObject key, @Nullable GridCacheVersion ver)
threadId - Thread id.key - Key.ver - Optional version.@Nullable public GridCacheMvccCandidate explicitLock(long threadId, KeyCacheObject key)
threadId - Thread id.key - Key to look up.null if
no such candidate.@Nullable public GridCacheMvccCandidate explicitLock(KeyCacheObject key, @Nullable GridCacheVersion ver)
key - Key.ver - Version.null if no such candidate.@Nullable public GridDiscoveryTopologySnapshot lastExplicitLockTopologySnapshot(long threadId)
threadId - Thread ID.public void printMemoryStats()
printMemoryStats in interface GridCacheSharedManagerprintMemoryStats in class GridCacheSharedManagerAdapterpublic IgniteInternalFuture<?> finishLocks(long topVer)
topVer - Topology version.public IgniteInternalFuture<?> finishExplicitLocks(long topVer)
topVer - Topology version to wait for.public IgniteInternalFuture<?> finishAtomicUpdates(long topVer)
topVer - Topology version to finish.public IgniteInternalFuture<?> finishKeys(Collection<KeyCacheObject> keys, long topVer)
keys - Key for which locks should be released.topVer - Topology version.public void recheckPendingLocks()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015