org.mortbay.j2ee.session
Class AbstractStore

java.lang.Object
  extended by org.mortbay.j2ee.session.AbstractStore
All Implemented Interfaces:
Cloneable, Store
Direct Known Subclasses:
AbstractReplicatedStore

public abstract class AbstractStore
extends Object
implements Store


Field Summary
protected  int _actualMaxInactiveInterval
          A maxInactiveInterval of -1 means never scavenge.
protected static org.jboss.logging.Logger _log
           
protected  Manager _manager
           
protected  Timer _scavenger
           
protected  int _scavengerExtraTime
          The extra time we wait before tidying up a CMPState to ensure that if it loaded locally it will be scavenged locally first...
protected  int _scavengerPeriod
          The period between scavenges
 
Constructor Summary
AbstractStore()
           
 
Method Summary
 String allocateId(javax.servlet.http.HttpServletRequest request)
           
 Object clone()
           
 void deallocateId(String id)
           
 void destroy()
           
 int getActualMaxInactiveInterval()
           
 Manager getManager()
           
 int getScavengerExtraTime()
           
 int getScavengerPeriod()
           
 void setActualMaxInactiveInterval(int secs)
           
 void setManager(Manager manager)
           
 void setScavengerExtraTime(int secs)
           
 void setScavengerPeriod(int secs)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mortbay.j2ee.session.Store
isDistributed, loadState, newState, passivateSession, removeState, scavenge, storeState
 

Field Detail

_log

protected static final org.jboss.logging.Logger _log

_scavengerPeriod

protected int _scavengerPeriod
The period between scavenges


_scavengerExtraTime

protected int _scavengerExtraTime
The extra time we wait before tidying up a CMPState to ensure that if it loaded locally it will be scavenged locally first...


_actualMaxInactiveInterval

protected int _actualMaxInactiveInterval
A maxInactiveInterval of -1 means never scavenge. The DB would fill up very quickly - so we can override -1 with a real value here.


_manager

protected Manager _manager

_scavenger

protected Timer _scavenger
Constructor Detail

AbstractStore

public AbstractStore()
Method Detail

getScavengerPeriod

public int getScavengerPeriod()

setScavengerPeriod

public void setScavengerPeriod(int secs)
Specified by:
setScavengerPeriod in interface Store

getScavengerExtraTime

public int getScavengerExtraTime()

setScavengerExtraTime

public void setScavengerExtraTime(int secs)
Specified by:
setScavengerExtraTime in interface Store

getActualMaxInactiveInterval

public int getActualMaxInactiveInterval()
Specified by:
getActualMaxInactiveInterval in interface Store

setActualMaxInactiveInterval

public void setActualMaxInactiveInterval(int secs)
Specified by:
setActualMaxInactiveInterval in interface Store

clone

public Object clone()
Specified by:
clone in interface Store
Overrides:
clone in class Object

getManager

public Manager getManager()
Specified by:
getManager in interface Store

setManager

public void setManager(Manager manager)
Specified by:
setManager in interface Store

start

public void start()
           throws Exception
Specified by:
start in interface Store
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface Store

destroy

public void destroy()
Specified by:
destroy in interface Store

allocateId

public String allocateId(javax.servlet.http.HttpServletRequest request)
Specified by:
allocateId in interface Store

deallocateId

public void deallocateId(String id)
Specified by:
deallocateId in interface Store


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.