Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.net.cache
Class CompactSerializationCache.HybridEvictionPolicy

java.lang.Object
  extended by com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
      extended by com.tangosol.net.cache.CompactSerializationCache.HybridEvictionPolicy

All Implemented Interfaces:
ConfigurableCacheMap.EvictionPolicy
Enclosing class:
CompactSerializationCache

protected class CompactSerializationCache.HybridEvictionPolicy
extends CompactSerializationCache.InternalEvictionPolicy

The EvictionPolicy object for the Hybrid eviction algorithm.


Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate, CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor

 

Field Summary
protected  CompactSerializationCache.TouchCountVisitor f_visitor
          The singleton TouchCountVisitor (eviction is single-threaded).
protected  int m_cTouchesAvg
          The average number of touches that each entry in the cache has.

 

Fields inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
f_visitorTouchCount, f_visitorTouchTime, m_ldtLastEvict

 

Constructor Summary
protected CompactSerializationCache.HybridEvictionPolicy()
           

 

Method Summary
protected  long calculateWeight(Binary binKey)
          Calculate the "weight" of the entry associated with the specified key.
protected  ConfigurableCacheMap.EvictionPolicy getConfiguredPolicy()
          Return the configured EvictionPolicy instance.
 void requestEviction(int cMaximum)
          This method is called by the cache when the cache requires the eviction policy to evict entries.

 

Methods inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
entryTouched, entryTouched, getName, touchInternal

 

Field Detail

m_cTouchesAvg

protected transient int m_cTouchesAvg
The average number of touches that each entry in the cache has. Used during the iteration (evict-set calculation) only.

f_visitor

protected final CompactSerializationCache.TouchCountVisitor f_visitor
The singleton TouchCountVisitor (eviction is single-threaded).

Constructor Detail

CompactSerializationCache.HybridEvictionPolicy

protected CompactSerializationCache.HybridEvictionPolicy()

Method Detail

requestEviction

public void requestEviction(int cMaximum)
This method is called by the cache when the cache requires the eviction policy to evict entries.
Specified by:
requestEviction in interface ConfigurableCacheMap.EvictionPolicy
Overrides:
requestEviction in class CompactSerializationCache.InternalEvictionPolicy
Parameters:
cMaximum - the maximum number of units that should remain in the cache when the eviction is complete

calculateWeight

protected long calculateWeight(Binary binKey)
Calculate the "weight" of the entry associated with the specified key. The weight is a quantitative measure of how to prioritize the eviction of this entry w.r.t. the other cache entries. Entries with a smaller weights are of higher priority and are preferred over entries with larger weights for eviction.
Specified by:
calculateWeight in class CompactSerializationCache.InternalEvictionPolicy
Parameters:
binKey - the key to calculate the weight for

getConfiguredPolicy

protected ConfigurableCacheMap.EvictionPolicy getConfiguredPolicy()
Return the configured EvictionPolicy instance.
Specified by:
getConfiguredPolicy in class CompactSerializationCache.InternalEvictionPolicy
Returns:
the configured EvictionPolicy

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.