1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.configuration.reloading;
19
20 import org.apache.commons.configuration.FileConfiguration;
21
22 /***
23 * A strategy to decide if a configuration should be reloaded.
24 *
25 * @author Emmanuel Bourg
26 * @author Olivier Heger
27 * @version $Revision: 439648 $, $Date: 2006-09-02 22:42:10 +0200 (Sa, 02 Sep 2006) $
28 * @since 1.1
29 */
30 public interface ReloadingStrategy
31 {
32 /***
33 * Set the configuration managed by this strategy.
34 *
35 * @param configuration the configuration to monitor
36 */
37 void setConfiguration(FileConfiguration configuration);
38
39 /***
40 * Initialize the strategy.
41 */
42 void init();
43
44 /***
45 * Tell if the evaluation of the strategy requires to reload the configuration.
46 *
47 * @return a flag whether a reload should be performed
48 */
49 boolean reloadingRequired();
50
51 /***
52 * Notify the strategy that the file has been reloaded.
53 */
54 void reloadingPerformed();
55
56 }