Package org.apache.catalina
Interface Store
- 
- All Known Implementing Classes:
- DataSourceStore,- FileStore,- JDBCStore,- StoreBase
 
 public interface StoreA Store is the abstraction of a Catalina component that provides persistent storage and loading of Sessions and their associated user data. Implementations are free to save and load the Sessions to any media they wish, but it is assumed that saved Sessions are persistent across server or context restarts.- Author:
- Craig R. McClanahan
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)Add a property change listener to this component.voidclear()Remove all Sessions from this Store.ManagergetManager()intgetSize()java.lang.String[]keys()Sessionload(java.lang.String id)Load and return the Session associated with the specified session identifier from this Store, without removing it.voidremove(java.lang.String id)Remove the Session with the specified session identifier from this Store, if present.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove a property change listener from this component.voidsave(Session session)Save the specified Session into this Store.voidsetManager(Manager manager)Set the Manager associated with this Store.
 
- 
- 
- 
Method Detail- 
getManagerManager getManager() - Returns:
- the Manager instance associated with this Store.
 
 - 
setManagervoid setManager(Manager manager) Set the Manager associated with this Store.- Parameters:
- manager- The Manager which will use this Store.
 
 - 
getSizeint getSize() throws java.io.IOException- Returns:
- the number of Sessions present in this Store.
- Throws:
- java.io.IOException- if an input/output error occurs
 
 - 
addPropertyChangeListenervoid addPropertyChangeListener(java.beans.PropertyChangeListener listener) Add a property change listener to this component.- Parameters:
- listener- The listener to add
 
 - 
keysjava.lang.String[] keys() throws java.io.IOException- Returns:
- an array containing the session identifiers of all Sessions currently saved in this Store. If there are no such Sessions, a zero-length array is returned.
- Throws:
- java.io.IOException- if an input/output error occurred
 
 - 
loadSession load(java.lang.String id) throws java.lang.ClassNotFoundException, java.io.IOException Load and return the Session associated with the specified session identifier from this Store, without removing it. If there is no such stored Session, returnnull.- Parameters:
- id- Session identifier of the session to load
- Returns:
- the loaded Session instance
- Throws:
- java.lang.ClassNotFoundException- if a deserialization error occurs
- java.io.IOException- if an input/output error occurs
 
 - 
removevoid remove(java.lang.String id) throws java.io.IOExceptionRemove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.- Parameters:
- id- Session identifier of the Session to be removed
- Throws:
- java.io.IOException- if an input/output error occurs
 
 - 
clearvoid clear() throws java.io.IOExceptionRemove all Sessions from this Store.- Throws:
- java.io.IOException- if an input/output error occurs
 
 - 
removePropertyChangeListenervoid removePropertyChangeListener(java.beans.PropertyChangeListener listener) Remove a property change listener from this component.- Parameters:
- listener- The listener to remove
 
 - 
savevoid save(Session session) throws java.io.IOException Save the specified Session into this Store. Any previously saved information for the associated session identifier is replaced.- Parameters:
- session- Session to be saved
- Throws:
- java.io.IOException- if an input/output error occurs
 
 
- 
 
-