org.codehaus.wadi.core.eviction
Class SimpleEvictable
java.lang.Object
org.codehaus.wadi.core.eviction.SimpleEvictable
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Evictable
- Direct Known Subclasses:
- AbstractMotable
public abstract class SimpleEvictable
- extends java.lang.Object
- implements Evictable, java.io.Externalizable
A very Simple impementation of Evictable
- Version:
- $Revision: 2244 $
- Author:
- Jules Gosnell
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
memento
protected SimpleEvictableMemento memento
SimpleEvictable
public SimpleEvictable()
newMemento
protected SimpleEvictableMemento newMemento()
init
public void init(long creationTime,
long lastAccessedTime,
int maxInactiveInterval)
- Specified by:
init
in interface Evictable
destroy
public void destroy()
throws java.lang.Exception
- Specified by:
destroy
in interface Evictable
- Throws:
java.lang.Exception
copy
public void copy(Evictable evictable)
throws java.lang.Exception
- Specified by:
copy
in interface Evictable
- Throws:
java.lang.Exception
mote
public void mote(Evictable recipient)
throws java.lang.Exception
- Specified by:
mote
in interface Evictable
- Throws:
java.lang.Exception
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interface Evictable
getLastAccessedTime
public long getLastAccessedTime()
- Specified by:
getLastAccessedTime
in interface Evictable
setLastAccessedTime
public void setLastAccessedTime(long lastAccessedTime)
- Specified by:
setLastAccessedTime
in interface Evictable
getMaxInactiveInterval
public int getMaxInactiveInterval()
- Specified by:
getMaxInactiveInterval
in interface Evictable
setMaxInactiveInterval
public void setMaxInactiveInterval(int maxInactiveInterval)
- Specified by:
setMaxInactiveInterval
in interface Evictable
getTimeToLive
public long getTimeToLive(long time)
- Specified by:
getTimeToLive
in interface Evictable
getTimedOut
public boolean getTimedOut(long time)
- Specified by:
getTimedOut
in interface Evictable
readExternal
public void readExternal(java.io.ObjectInput oi)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeExternal
public void writeExternal(java.io.ObjectOutput oo)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
onDeserialization
protected void onDeserialization()
onSerialization
protected void onSerialization()
Copyright © 2011. All Rights Reserved.