You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2014/06/19 20:56:21 UTC

svn commit: r1604000 - in /commons/proper/configuration/trunk/src/site/xdoc/userguide: howto_reloading.xml user_guide.xml

Author: oheger
Date: Thu Jun 19 18:56:21 2014
New Revision: 1604000

URL: http://svn.apache.org/r1604000
Log:
Some enhancements of the reloading chapter of the user's guide.

The ReloadingDetectorFactory is now mentioned, and the builder parameters
related to reloading are listed.

Modified:
    commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml
    commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml

Modified: commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml?rev=1604000&r1=1603999&r2=1604000&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml (original)
+++ commons/proper/configuration/trunk/src/site/xdoc/userguide/howto_reloading.xml Thu Jun 19 18:56:21 2014
@@ -126,10 +126,17 @@
       <code>ReloadingFileBasedConfigurationBuilder</code> already creates a
       <code>ReloadingController</code> and initializes it with a
       <code>ReloadingDetector</code> that is associated with the file managed
-      by the builder. Actually, an instance of the
+      by the builder. (Actually, the situation is a bit more complex: the
+      creation of the reloading detector is delegated to an object implementing
+      the <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingDetectorFactory.html">
+      ReloadingDetectorFactory</a></code> interface. The factory to be used can
+      be configured via the builder's initialization parameters. Per default, a
+      <code><a href="../apidocs/org/apache/commons/configuration/builder/DefaultReloadingDetectorFactory.html">
+      DefaultReloadingDetectorFactory</a></code> object is used which creates
+      an instance of the
       <code><a href="../apidocs/org/apache/commons/configuration/reloading/FileHandlerReloadingDetector.html">
-      FileHandlerReloadingDetector</a></code> class is used which can detect
-      changes on a file referenced by a <code>FileHandler</code>. The builder
+      FileHandlerReloadingDetector</a></code> class. Such an object can detect
+      changes on a file referenced by a <code>FileHandler</code>.) The builder
       is already registered as change listener at the reloading controller;
       when the controller sends a notification that a change was detected the
       builder resets itself. The next time the managed configuration is queried
@@ -234,6 +241,31 @@ trigger.start();
     </p>
     </subsection>
 
+    <subsection name="Builder Configuration Related to Reloading">
+    <p>
+      When setting up a configuration builder with reloading support for
+      file-based configurations some settings can be defined that influence
+      reloading operations. These settings are part of the initialization
+      parameters for file-based configurations and defined by the
+      <code><a href="../apidocs/org/apache/commons/configuration/builder/FileBasedBuilderProperties.html">
+      FileBasedBuilderProperties</a></code> interface:
+      <ul>
+        <li>The <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingDetectorFactory.html">
+        ReloadingDetectorFactory</a></code> to be used when the reloading
+        controller is created. An application with special requirements related
+        to the detection of changes can here provide a custom factory. As was
+        mentioned above, the default factory creates a suitable detector for
+        detecting changes on a file.</li>
+        <li>The so-called <em>reloading refresh delay</em>. This is a numeric
+        value in milliseconds limiting the access to the underlying file. The
+        reloading detector will check for updates on the file only if the last
+        check was not within the time span defined by the refresh delay. This
+        value can be used to improve performance if there are many accesses to
+        a configuration builder in short intervals.</li>
+      </ul>
+    </p>
+    </subsection>
+
     <subsection name="Generic Reloading Support">
     <p>
       In fact, <code><a href="../apidocs/org/apache/commons/configuration/builder/ReloadingFileBasedConfigurationBuilder.html">

Modified: commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml?rev=1604000&r1=1603999&r2=1604000&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml (original)
+++ commons/proper/configuration/trunk/src/site/xdoc/userguide/user_guide.xml Thu Jun 19 18:56:21 2014
@@ -110,6 +110,7 @@
       <ul>
         <li><a href="howto_reloading.html#Components_for_Reloading">Components for Reloading</a></li>
         <li><a href="howto_reloading.html#Reloading_File-based_Configurations">Reloading File-based Configurations</a></li>
+        <li><a href="howto_reloading.html#Builder_Configuration_Related_to_Reloading">Builder Configuration Related to Reloading</a></li>
         <li><a href="howto_reloading.html#Generic_Reloading_Support">Generic Reloading Support</a></li>
         <li><a href="howto_reloading.html#Reloading_Checks_on_Builder_Access">Reloading Checks on Builder Access</a></li>
         <li><a href="howto_reloading.html#Managed_Reloading">Managed Reloading</a></li>