org.codehaus.wadi.impl
Class SimpleEvictable

java.lang.Object
  extended byorg.codehaus.wadi.impl.SimpleEvictable
All Implemented Interfaces:
Evictable, Serializable
Direct Known Subclasses:
AbstractMotable, HttpProxyLocation

public abstract class SimpleEvictable
extends Object
implements Evictable, Serializable

A very Simple impementation of Evictable

Version:
$Revision: 1200 $
Author:
Jules Gosnell
See Also:
Serialized Form

Field Summary
protected  long _creationTime
           
protected  long _lastAccessedTime
           
protected  int _maxInactiveInterval
           
 
Constructor Summary
SimpleEvictable()
           
 
Method Summary
 boolean checkTimeframe(long time)
           
 void copy(Evictable evictable)
           
 void destroy()
           
 long getCreationTime()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 boolean getTimedOut(long time)
           
 long getTimeToLive(long time)
           
 void init(long creationTime, long lastAccessedTime, int maxInactiveInterval)
           
 boolean isNew()
           
 void mote(Evictable recipient)
           
 void readContent(ObjectInput oi)
           
 void setLastAccessedTime(long lastAccessedTime)
           
 void setMaxInactiveInterval(int maxInactiveInterval)
           
 void writeContent(ObjectOutput oo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_creationTime

protected long _creationTime

_lastAccessedTime

protected long _lastAccessedTime

_maxInactiveInterval

protected int _maxInactiveInterval
Constructor Detail

SimpleEvictable

public SimpleEvictable()
Method Detail

init

public void init(long creationTime,
                 long lastAccessedTime,
                 int maxInactiveInterval)
Specified by:
init in interface Evictable

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface Evictable
Throws:
Exception

copy

public void copy(Evictable evictable)
          throws Exception
Specified by:
copy in interface Evictable
Throws:
Exception

mote

public void mote(Evictable recipient)
          throws Exception
Specified by:
mote in interface Evictable
Throws:
Exception

readContent

public void readContent(ObjectInput oi)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeContent

public void writeContent(ObjectOutput oo)
                  throws IOException
Throws:
IOException

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

isNew

public boolean isNew()
Specified by:
isNew in interface Evictable

checkTimeframe

public boolean checkTimeframe(long time)
Specified by:
checkTimeframe 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


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.