Class GridCacheClearAllRunnable<K,V>
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheClearAllRunnable<K,V>
-
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
GridNearCacheClearAllRunnable
public class GridCacheClearAllRunnable<K,V> extends Object implements Runnable
Base runnable forIgniteInternalCache.clearLocally(boolean, boolean, boolean)routine.
-
-
Field Summary
Fields Modifier and Type Field Description protected GridCacheAdapter<K,V>cacheCache to be cleared.protected GridCacheContext<K,V>ctxCache context.protected intidMod for the given runnable.protected IgniteLoggerlogLogger.protected GridCacheVersionobsoleteVerObsolete version.protected booleanreadersWhether to clear readers.protected inttotalCntMods count across all spawned clearLocally runnables.
-
Constructor Summary
Constructors Constructor Description GridCacheClearAllRunnable(GridCacheAdapter<K,V> cache, GridCacheVersion obsoleteVer, int id, int totalCnt, boolean readers)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearEntry(GridCacheEntryEx e)Clear entry from cache.intid()protected booleanowns(KeyCacheObject key)Check whether this worker owns particular key.booleanreaders()voidrun()StringtoString()inttotalCount()
-
-
-
Field Detail
-
cache
protected final GridCacheAdapter<K,V> cache
Cache to be cleared.
-
obsoleteVer
protected final GridCacheVersion obsoleteVer
Obsolete version.
-
id
protected final int id
Mod for the given runnable.
-
totalCnt
protected final int totalCnt
Mods count across all spawned clearLocally runnables.
-
readers
protected final boolean readers
Whether to clear readers.
-
ctx
protected final GridCacheContext<K,V> ctx
Cache context.
-
log
protected final IgniteLogger log
Logger.
-
-
Constructor Detail
-
GridCacheClearAllRunnable
public GridCacheClearAllRunnable(GridCacheAdapter<K,V> cache, GridCacheVersion obsoleteVer, int id, int totalCnt, boolean readers)
Constructor.- Parameters:
cache- Cache to be cleared.obsoleteVer- Obsolete version.id- Mod for the given runnable.totalCnt- Mods count across all spawned clearLocally runnables.
-
-
Method Detail
-
clearEntry
protected void clearEntry(GridCacheEntryEx e)
Clear entry from cache.- Parameters:
e- Entry.
-
owns
protected boolean owns(KeyCacheObject key)
Check whether this worker owns particular key.- Parameters:
key- Key.- Returns:
Truein case this worker should process this key.
-
id
public int id()
- Returns:
- ID for the given runnable.
-
totalCount
public int totalCount()
- Returns:
- Total count across all spawned clearLocally runnables.
-
readers
public boolean readers()
- Returns:
- Whether to clean readers.
-
-