tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1715514 - /tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
Date Sat, 21 Nov 2015 13:09:04 GMT
Author: fschumacher
Date: Sat Nov 21 13:09:04 2015
New Revision: 1715514

URL: http://svn.apache.org/viewvc?rev=1715514&view=rev
Log:
javadoc changes. Markup changes and addition of return annotations.

Modified:
    tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java

Modified: tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java?rev=1715514&r1=1715513&r2=1715514&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/PersistentManagerBase.java Sat Nov 21 13:09:04
2015
@@ -37,13 +37,14 @@ import org.apache.catalina.security.Secu
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 /**
- * Extends the <b>ManagerBase</b> class to implement most of the
+ * Extends the {@link ManagerBase} class to implement most of the
  * functionality required by a Manager which supports any kind of
  * persistence, even if only for  restarts.
  * <p>
  * <b>IMPLEMENTATION NOTE</b>:  Correct behavior of session storing and
- * reloading depends upon external calls to the <code>start()</code> and
- * <code>stop()</code> methods of this class at the correct times.
+ * reloading depends upon external calls to the {@link LifecycleBase#start() start()}
+ * and {@link LifecycleBase#stop() stop()} methods of this class
+ * at the correct times.
  *
  * @author Craig R. McClanahan
  */
@@ -157,7 +158,7 @@ public abstract class PersistentManagerB
 
     /**
      * How long a session must be idle before it should be backed up.
-     * -1 means sessions won't be backed up.
+     * {@code -1} means sessions won't be backed up.
      */
     protected int maxIdleBackup = -1;
 
@@ -165,13 +166,13 @@ public abstract class PersistentManagerB
     /**
      * Minimum time a session must be idle before it is swapped to disk.
      * This overrides maxActiveSessions, to prevent thrashing if there are lots
-     * of active sessions. Setting to -1 means it's ignored.
+     * of active sessions. Setting to {@code -1} means it's ignored.
      */
     protected int minIdleSwap = -1;
 
     /**
      * The maximum time a session may be idle before it should be swapped
-     * to file just on general principle. Setting this to -1 means sessions
+     * to file just on general principle. Setting this to {@code -1} means sessions
      * should not be forced out.
      */
     protected int maxIdleSwap = -1;
@@ -188,8 +189,10 @@ public abstract class PersistentManagerB
 
     /**
      * Indicates how many seconds old a session can get, after its last use in a
-     * request, before it should be backed up to the store. -1 means sessions
+     * request, before it should be backed up to the store. {@code -1} means sessions
      * are not backed up.
+     *
+     * @return the timeout after which sessions are ripe for back up
      */
     public int getMaxIdleBackup() {
 
@@ -203,16 +206,16 @@ public abstract class PersistentManagerB
      * are used in a request. Sessions remain available in memory
      * after being backed up, so they are not passivated as they are
      * when swapped out. The value set indicates how old a session
-     * may get (since its last use) before it must be backed up: -1
+     * may get (since its last use) before it must be backed up: {@code -1}
      * means sessions are not backed up.
      * <p>
      * Note that this is not a hard limit: sessions are checked
-     * against this age limit periodically according to <b>processExpiresFrequency</b>.
+     * against this age limit periodically according to {@code processExpiresFrequency}.
      * This value should be considered to indicate when a session is
      * ripe for backing up.
      * <p>
-     * So it is possible that a session may be idle for maxIdleBackup +
-     * processExpiresFrequency * engine.backgroundProcessorDelay seconds, plus the time it
takes to handle other
+     * So it is possible that a session may be idle for {@code maxIdleBackup +
+     * processExpiresFrequency * engine.backgroundProcessorDelay} seconds, plus the time
it takes to handle other
      * session expiration, swapping, etc. tasks.
      *
      * @param backup The number of seconds after their last accessed
@@ -232,7 +235,7 @@ public abstract class PersistentManagerB
 
 
     /**
-     * The time in seconds after which a session should be swapped out of
+     * @return The time in seconds after which a session should be swapped out of
      * memory to disk.
      */
     public int getMaxIdleSwap() {
@@ -245,6 +248,8 @@ public abstract class PersistentManagerB
     /**
      * Sets the time in seconds after which a session should be swapped out of
      * memory to disk.
+     *
+     * @param max time in seconds to wait for possible swap out
      */
     public void setMaxIdleSwap(int max) {
 
@@ -260,8 +265,8 @@ public abstract class PersistentManagerB
 
 
     /**
-     * The minimum time in seconds that a session must be idle before
-     * it can be swapped out of memory, or -1 if it can be swapped out
+     * @return The minimum time in seconds that a session must be idle before
+     * it can be swapped out of memory, or {@code -1} if it can be swapped out
      * at any time.
      */
     public int getMinIdleSwap() {
@@ -273,8 +278,10 @@ public abstract class PersistentManagerB
 
     /**
      * Sets the minimum time in seconds that a session must be idle before
-     * it can be swapped out of memory due to maxActiveSession. Set it to -1
+     * it can be swapped out of memory due to maxActiveSession. Set it to {@code -1}
      * if it can be swapped out at any time.
+     *
+     * @param int time in seconds before a possible swap out
      */
     public void setMinIdleSwap(int min) {
 
@@ -290,10 +297,11 @@ public abstract class PersistentManagerB
 
 
     /**
-     * Return true, if the session id is loaded in memory
-     * otherwise false is returned
+     * Check, whether a session is loaded in memory
      *
      * @param id The session id for the session to be searched for
+     * @return {@code true}, if the session id is loaded in memory
+     * otherwise {@code false} is returned
      */
     public boolean isLoaded( String id ){
         try {
@@ -307,7 +315,7 @@ public abstract class PersistentManagerB
 
 
     /**
-     * Return the descriptive short name of this Manager implementation.
+     * @return the descriptive short name of this Manager implementation.
      */
     @Override
     public String getName() {
@@ -331,7 +339,7 @@ public abstract class PersistentManagerB
 
 
     /**
-     * Return the Store object which manages persistent Session
+     * @return the Store object which manages persistent Session
      * storage for this Manager.
      */
     @Override
@@ -344,7 +352,10 @@ public abstract class PersistentManagerB
 
     /**
      * Indicates whether sessions are saved when the Manager is shut down
-     * properly. This requires the unload() method to be called.
+     * properly. This requires the {@link Manager#unload() unload()} method to be called.
+     *
+     * @return {@code true}, when sessions should be saved on restart,
+     * {code false} otherwise
      */
     public boolean getSaveOnRestart() {
 
@@ -359,7 +370,7 @@ public abstract class PersistentManagerB
      * false, any sessions found in the Store may still be picked up when
      * the Manager is started again.
      *
-     * @param saveOnRestart true if sessions should be saved on restart, false if
+     * @param saveOnRestart {@code true} if sessions should be saved on restart, {@code false}
if
      *     they should be ignored.
      */
     public void setSaveOnRestart(boolean saveOnRestart) {
@@ -407,7 +418,8 @@ public abstract class PersistentManagerB
 
 
     /**
-     * Implements the Manager interface, direct call to processExpires and processPersistenceChecks
+     * Implements the {@link org.apache.catalina.Manager Manager} interface,
+     * direct call to processExpires and processPersistenceChecks
      */
     @Override
     public void processExpires() {
@@ -675,6 +687,8 @@ public abstract class PersistentManagerB
      * The session will be removed from the Store after swapping
      * in, but will not be added to the active session list if it
      * is invalid or past its expiration.
+     *
+     * @return restored session, or {@code null}, if none is found
      */
     protected Session swapIn(String id) throws IOException {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message