org.jboss.cache.eviction
Class NullEvictionPolicy

java.lang.Object
  extended by org.jboss.cache.eviction.NullEvictionPolicy
All Implemented Interfaces:
EvictionPolicy, ModernizablePolicy

Deprecated. see NullEvictionAlgorithm

@Deprecated
public class NullEvictionPolicy
extends Object
implements EvictionPolicy, ModernizablePolicy

Eviction policy that does nothing and always tells the eviction interceptor an event can be ignored, saving the overhead of constructing and processing event objects. Basically useful as a default policy for a cache or subtree that is shared between multiple usages, some of which don't want eviction.

Author:
Brian Stansberry

Constructor Summary
NullEvictionPolicy()
          Deprecated.  
 
Method Summary
 boolean canIgnoreEvent(Fqn fqn, EvictionEventType eventType)
          Deprecated. Returns true
 void evict(Fqn fqn)
          Deprecated. No-op
 CacheSPI getCache()
          Deprecated.  
 EvictionAlgorithm getEvictionAlgorithm()
          Deprecated. Returns NullEvictionAlgorithm.INSTANCE.
 Class<? extends EvictionPolicyConfig> getEvictionConfigurationClass()
          Deprecated. Returns NullEvictionPolicyConfig.
 Class<? extends EvictionAlgorithm> modernizePolicy()
          Deprecated.  
 void setCache(CacheSPI cache)
          Deprecated. Method called to set the cache in this implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullEvictionPolicy

public NullEvictionPolicy()
Deprecated. 
Method Detail

canIgnoreEvent

public boolean canIgnoreEvent(Fqn fqn,
                              EvictionEventType eventType)
Deprecated. 
Returns true

Specified by:
canIgnoreEvent in interface EvictionPolicy
Parameters:
fqn - The Fqn of the node associated with the event.
eventType - the type of the event
Returns:
true to ignore events of this type for this Fqn, false to process events normally.

evict

public void evict(Fqn fqn)
           throws Exception
Deprecated. 
No-op

Specified by:
evict in interface EvictionPolicy
Parameters:
fqn - DataNode corresponds to this fqn.
Throws:
Exception

getEvictionAlgorithm

public EvictionAlgorithm getEvictionAlgorithm()
Deprecated. 
Returns NullEvictionAlgorithm.INSTANCE.

Specified by:
getEvictionAlgorithm in interface EvictionPolicy
Returns:
An EvictionAlgorithm implementation.

getEvictionConfigurationClass

public Class<? extends EvictionPolicyConfig> getEvictionConfigurationClass()
Deprecated. 
Returns NullEvictionPolicyConfig.

Specified by:
getEvictionConfigurationClass in interface EvictionPolicy
Returns:
EvictionPolicyConfig implementation class.

getCache

public CacheSPI getCache()
Deprecated. 
Specified by:
getCache in interface EvictionPolicy
Returns:
the CacheSPI instance this eviction policy is configured to work on.

setCache

public void setCache(CacheSPI cache)
Deprecated. 
Description copied from interface: EvictionPolicy
Method called to set the cache in this implementation.

Specified by:
setCache in interface EvictionPolicy
Parameters:
cache - the cache to set

modernizePolicy

public Class<? extends EvictionAlgorithm> modernizePolicy()
Deprecated. 
Specified by:
modernizePolicy in interface ModernizablePolicy


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.