Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sboikov committed Mar 11, 2015
1 parent a5e9abc commit caa0039
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -58,7 +58,7 @@
/**
* Cache eviction manager.
*/
public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V> {
public class GridCacheEvictionManager extends GridCacheManagerAdapter {
/** Unsafe instance. */
private static final sun.misc.Unsafe unsafe = GridUnsafe.unsafe();

Expand Down Expand Up @@ -129,7 +129,7 @@ public class GridCacheEvictionManager<K, V> extends GridCacheManagerAdapter<K, V
@Override public void start0() throws IgniteCheckedException {
CacheConfiguration cfg = cctx.config();

plc = cctx.isNear() ? cfg.<K, V>getNearEvictionPolicy() : cfg.<K, V>getEvictionPolicy();
plc = cctx.isNear() ? cfg.getNearEvictionPolicy() : cfg.getEvictionPolicy();

memoryMode = cctx.config().getMemoryMode();

Expand Down Expand Up @@ -619,7 +619,7 @@ private boolean evictLocally(KeyCacheObject key,
log.debug("Evicting key locally [key=" + key + ", ver=" + ver + ", obsoleteVer=" + obsoleteVer +
", localNode=" + cctx.localNode() + ']');

GridCacheAdapter<K, V> cache = near ? cctx.dht().near() : cctx.cache();
GridCacheAdapter cache = near ? cctx.dht().near() : cctx.cache();

GridCacheEntryEx entry = cache.peekEx(key);

Expand Down Expand Up @@ -650,7 +650,7 @@ private boolean evictLocally(KeyCacheObject key,
* @throws IgniteCheckedException If failed to evict entry.
*/
private boolean evict0(
GridCacheAdapter<K, V> cache,
GridCacheAdapter cache,
GridCacheEntryEx entry,
GridCacheVersion obsoleteVer,
@Nullable CacheEntryPredicate[] filter,
Expand Down Expand Up @@ -909,7 +909,7 @@ public boolean evict(@Nullable GridCacheEntryEx entry, @Nullable GridCacheVersio
* @param obsoleteVer Obsolete version.
* @throws IgniteCheckedException In case of error.
*/
public void batchEvict(Collection<? extends K> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException {
public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException {
assert !evictSyncAgr;
assert cctx.isSwapOrOffheapEnabled();

Expand All @@ -919,12 +919,12 @@ public void batchEvict(Collection<? extends K> keys, @Nullable GridCacheVersion

boolean recordable = cctx.events().isRecordable(EVT_CACHE_ENTRY_EVICTED);

GridCacheAdapter<K, V> cache = cctx.cache();
GridCacheAdapter cache = cctx.cache();

Map<K, GridCacheEntryEx> cached = U.newLinkedHashMap(keys.size());
Map<Object, GridCacheEntryEx> cached = U.newLinkedHashMap(keys.size());

// Get all participating entries to avoid deadlock.
for (K k : keys) {
for (Object k : keys) {
KeyCacheObject cacheKey = cctx.toCacheKeyObject(k);

GridCacheEntryEx e = cache.peekEx(cacheKey);
Expand Down

0 comments on commit caa0039

Please sign in to comment.