Author: markt
Date: Fri Sep 14 07:23:43 2018
New Revision: 1840891

URL: http://svn.apache.org/viewvc?rev=1840891&view=rev
Log:
Extend background processing to UserDatabase instances

Modified:
    tomcat/trunk/java/org/apache/catalina/UserDatabase.java
    tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/UserDatabase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/UserDatabase.java?rev=1840891&r1=1840890&r2=1840891&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/UserDatabase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/UserDatabase.java Fri Sep 14 07:23:43 
2018
@@ -162,4 +162,13 @@ public interface UserDatabase {
      * @exception Exception if any exception is thrown during saving
      */
     public void save() throws Exception;
+
+
+    /**
+     * Perform any background processing (e.g. checking for changes in 
persisted
+     * storage) required for the user database.
+     */
+    public default void backgroundProcess() {
+        // NO-OP by default
+    }
 }

Modified: tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java?rev=1840891&r1=1840890&r2=1840891&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java Fri Sep 
14 07:23:43 2018
@@ -136,6 +136,12 @@ public class UserDatabaseRealm extends R
 
     // ------------------------------------------------------ Protected Methods
 
+    @Override
+    public void backgroundProcess() {
+        database.backgroundProcess();
+    }
+
+
     /**
      * Return the password associated with the given principal's user name.
      */



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

Reply via email to