kief01/04/14 03:56:29
Modified:catalina/src/share/org/apache/catalina/session
FileStore.java
Log:
Removed code which duplicates that in Manager, namely the background
thread checking for expired sessions. This involved removing implementation
of the Lifecycle and Runnable interfaces.
Also changed the log method to indicate messages as comming from FileStore
rather than Manager.
Revision ChangesPath
1.4 +9 -267
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java
Index: FileStore.java
===
RCS file:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FileStore.java2001/04/12 18:18:58 1.3
+++ FileStore.java2001/04/14 10:56:29 1.4
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
1.3 2001/04/12 18:18:58 kief Exp $
- * $Revision: 1.3 $
- * $Date: 2001/04/12 18:18:58 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/FileStore.java,v
1.4 2001/04/14 10:56:29 kief Exp $
+ * $Revision: 1.4 $
+ * $Date: 2001/04/14 10:56:29 $
*
*
*
@@ -105,11 +105,11 @@
* saved are still subject to being expired based on inactivity.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.3 $ $Date: 2001/04/12 18:18:58 $
+ * @version $Revision: 1.4 $ $Date: 2001/04/14 10:56:29 $
*/
public final class FileStore
-implements Lifecycle, Runnable, Store {
+implements Store {
// - Constants
@@ -125,17 +125,12 @@
/**
- * The interval (in seconds) between checks for expired sessions.
- */
-private int checkInterval = 60;
-
-
-/**
* The pathname of the directory in which Sessions are stored.
* Relative to the temp directory for the web application.
*/
private String directory = ".";
+
/**
* A File representing the directory in which Sessions are stored.
*/
@@ -149,12 +144,6 @@
/**
- * The lifecycle event support for this component.
- */
-protected LifecycleSupport lifecycle = new LifecycleSupport(this);
-
-
-/**
* The string manager for this package.
*/
private StringManager sm =
@@ -162,30 +151,12 @@
/**
- * Has this component been started yet?
- */
-private boolean started = false;
-
-
-/**
* The property change support for this component.
*/
private PropertyChangeSupport support = new PropertyChangeSupport(this);
/**
- * The background thread.
- */
-private Thread thread = null;
-
-
-/**
- * The background thread completion semaphore.
- */
-private boolean threadDone = false;
-
-
-/**
* The Manager with which this FileStore is associated.
*/
protected Manager manager;
@@ -197,42 +168,10 @@
protected int debug = 0;
-/**
- * Name to register for the background thread.
- */
-private String threadName = "FileStore";
-
-
// - Properties
/**
- * Return the check interval (in seconds) for this Manager.
- */
-public int getCheckInterval() {
-
-return (this.checkInterval);
-
-}
-
-
-/**
- * Set the check interval (in seconds) for this Manager.
- *
- * @param checkInterval The new check interval
- */
-public void setCheckInterval(int checkInterval) {
-
-int oldCheckInterval = this.checkInterval;
-this.checkInterval = checkInterval;
-support.firePropertyChange("checkInterval",
- new Integer(oldCheckInterval),
- new Integer(this.checkInterval));
-
-}
-
-
-/**
* Return the directory path for this Store.
*/
public String getDirectory() {
@@ -495,6 +434,7 @@
}
+
/**
* Remove a property change listener from this component.
*
@@ -548,82 +488,6 @@
}
-// -- Lifecycle Methods
-
-
-/**
- * Add a lifecycle event listener to this component.
- *
- * @param listener The listener to add
- */
-public void addLifecycleListener(LifecycleListener listener) {
-
-