org.apache.commons.cache
Class BaseStashPolicy
java.lang.Object
org.apache.commons.cache.BaseStashPolicy
- All Implemented Interfaces:
- Serializable, StashPolicy
public abstract class BaseStashPolicy
- extends Object
- implements StashPolicy
An abstract base implementation of StashPolicy
,
declaring the non-serialized version of
shouldStore
to invoke the
serialized one, and wantsSerializedForm
to
return false.
- Version:
- $Id: BaseStashPolicy.java 155435 2005-02-26 13:17:27Z dirkv $
- Author:
- Rodney Waldhoff
- See Also:
- Serialized Form
Method Summary |
abstract void |
setCache(Cache c)
|
boolean |
shouldStore(Serializable key,
Serializable val,
Long expiresAt,
Long cost)
Equivalent to canStore(key,val,expiresAt,cost,null)) . |
abstract boolean |
shouldStore(Serializable key,
Serializable val,
Long expiresAt,
Long cost,
byte[] serialized)
|
abstract void |
unsetCache()
|
boolean |
wantsSerializedForm()
Returns false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseStashPolicy
public BaseStashPolicy()
shouldStore
public abstract boolean shouldStore(Serializable key,
Serializable val,
Long expiresAt,
Long cost,
byte[] serialized)
- Specified by:
shouldStore
in interface StashPolicy
setCache
public abstract void setCache(Cache c)
- Specified by:
setCache
in interface StashPolicy
unsetCache
public abstract void unsetCache()
- Specified by:
unsetCache
in interface StashPolicy
shouldStore
public boolean shouldStore(Serializable key,
Serializable val,
Long expiresAt,
Long cost)
- Equivalent to
canStore(key,val,expiresAt,cost,null))
.
- Specified by:
shouldStore
in interface StashPolicy
wantsSerializedForm
public boolean wantsSerializedForm()
- Returns false.
- Specified by:
wantsSerializedForm
in interface StashPolicy
- Returns:
- false.
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.