public class GridCacheMvccManager<K,V> extends GridCacheSharedManagerAdapter<K,V>
cctx, log| Constructor and Description |
|---|
GridCacheMvccManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAtomicFuture(GridCacheVersion futVer,
GridCacheAtomicFuture<K,?> fut) |
void |
addExplicitLock(long threadId,
GridCacheMvccCandidate<K> cand,
GridDiscoveryTopologySnapshot snapshot)
Adds candidate to the list of near local candidates.
|
boolean |
addFuture(GridCacheFuture<?> fut)
Adds future.
|
boolean |
addLocal(GridCacheMvccCandidate<K> cand) |
boolean |
addNext(GridCacheContext<K,V> cacheCtx,
GridCacheMvccCandidate<K> cand) |
boolean |
addRemoved(GridCacheContext<K,V> cacheCtx,
GridCacheVersion ver) |
IgniteInternalFuture<?> |
atomicFuture(GridCacheVersion futVer)
Gets future by given future ID.
|
Collection<GridCacheAtomicFuture<K,?>> |
atomicFutures() |
GridCacheMvccCallback<K,V> |
callback() |
void |
cancelClientFutures()
Cancels all client futures.
|
GridCacheMvccCandidate<K> |
explicitLock(K key,
GridCacheVersion ver)
Gets explicit lock candidate added by any thread by given key and lock version.
|
GridCacheMvccCandidate<K> |
explicitLock(long threadId,
K 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<K> 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(K key,
long threadId)
Checks if given key is locked by thread with given id or any thread.
|
boolean |
isRemoved(GridCacheContext<K,V> cacheCtx,
GridCacheVersion ver) |
GridDiscoveryTopologySnapshot |
lastExplicitLockTopologySnapshot(long threadId) |
Collection<GridCacheMvccCandidate<K>> |
localCandidates()
This method has poor performance, so use with care.
|
Collection<GridCacheVersion> |
localDhtPendingVersions(Collection<K> keys,
GridCacheVersion base) |
GridCacheVersion |
mappedVersion(GridCacheVersion from) |
void |
mapVersion(GridCacheVersion from,
GridCacheVersion to) |
void |
markExplicitOwner(K 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<K>> |
remoteCandidates()
This method has poor performance, so use with care.
|
IgniteInternalFuture<?> |
removeAtomicFuture(GridCacheVersion futVer) |
void |
removeExplicitLock(GridCacheMvccCandidate<K> cand)
Removes candidate from the list of near local candidates.
|
GridCacheMvccCandidate<K> |
removeExplicitLock(long threadId,
K key,
GridCacheVersion ver)
Removes explicit lock for given thread id, key and optional version.
|
boolean |
removeFuture(GridCacheFuture<?> fut) |
boolean |
removeLocal(GridCacheMvccCandidate<K> 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 GridCacheSharedManagerAdapter<K,V>IgniteCheckedException - If failed.public void onKernalStart0()
throws IgniteCheckedException
onKernalStart0 in class GridCacheSharedManagerAdapter<K,V>IgniteCheckedException - If failed.public void onKernalStop0(boolean cancel)
onKernalStop0 in class GridCacheSharedManagerAdapter<K,V>cancel - Cancel flag.public GridCacheMvccCallback<K,V> 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<K,?> fut)
futVer - Future ID.fut - Future.public Collection<GridCacheAtomicFuture<K,?>> 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<K,V> cacheCtx, GridCacheVersion ver)
ver - Lock version to check.True if lock had been removed.public boolean addRemoved(GridCacheContext<K,V> cacheCtx, GridCacheVersion ver)
ver - Obsolete entry version.True if added.public Collection<GridCacheMvccCandidate<K>> remoteCandidates()
DGC.public Collection<GridCacheMvccCandidate<K>> localCandidates()
DGC.public boolean addLocal(GridCacheMvccCandidate<K> cand)
cand - Local lock.True if added.public boolean removeLocal(GridCacheMvccCandidate<K> cand)
cand - Local candidate to remove.True if removed.public Collection<GridCacheVersion> localDhtPendingVersions(Collection<K> keys, GridCacheVersion base)
keys - Keys.base - Base version.base whose keys are in the keys collection.public boolean addNext(GridCacheContext<K,V> cacheCtx, GridCacheMvccCandidate<K> cand)
cand - Cache lock candidate to add.True if added as a result of this operation,
false if was previously added.public void addExplicitLock(long threadId,
GridCacheMvccCandidate<K> cand,
GridDiscoveryTopologySnapshot snapshot)
threadId - Thread ID.cand - Candidate to add.snapshot - Topology snapshot.public void removeExplicitLock(GridCacheMvccCandidate<K> cand)
cand - Candidate to remove.public boolean isLockedByThread(K 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(K key, long threadId)
key - Key.threadId - Thread id.public GridCacheMvccCandidate<K> removeExplicitLock(long threadId, K key, @Nullable GridCacheVersion ver)
threadId - Thread id.key - Key.ver - Optional version.@Nullable public GridCacheMvccCandidate<K> explicitLock(long threadId, K key)
threadId - Thread id.key - Key to look up.null if
no such candidate.@Nullable public GridCacheMvccCandidate<K> explicitLock(K 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 GridCacheSharedManager<K,V>printMemoryStats in class GridCacheSharedManagerAdapter<K,V>public 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<K> 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-RC1 Release Date : February 17 2015