Class CombinedReloadingController.MultiReloadingControllerDetector
- java.lang.Object
-
- org.apache.commons.configuration2.reloading.CombinedReloadingController.MultiReloadingControllerDetector
-
- All Implemented Interfaces:
ReloadingDetector
- Enclosing class:
- CombinedReloadingController
private static final class CombinedReloadingController.MultiReloadingControllerDetector extends java.lang.Object implements ReloadingDetector
A specialized implementation of theReloadingDetector
interface which operates on a collection ofReloadingController
objects. The methods defined by theReloadingDetector
interface are delegated to the managed controllers.
-
-
Field Summary
Fields Modifier and Type Field Description private CombinedReloadingController
owner
A reference to the owning combined reloading controller.
-
Constructor Summary
Constructors Constructor Description MultiReloadingControllerDetector(CombinedReloadingController owner)
Creates a new instance ofMultiReloadingControllerDetector
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isReloadingRequired()
Checks whether all criteria for a reload operation are fulfilled.void
reloadingPerformed()
Notifies this object that a reload operation has been performed.
-
-
-
Field Detail
-
owner
private final CombinedReloadingController owner
A reference to the owning combined reloading controller.
-
-
Constructor Detail
-
MultiReloadingControllerDetector
public MultiReloadingControllerDetector(CombinedReloadingController owner)
Creates a new instance ofMultiReloadingControllerDetector
.- Parameters:
owner
- the owner
-
-
Method Detail
-
isReloadingRequired
public boolean isReloadingRequired()
Checks whether all criteria for a reload operation are fulfilled. This method is called by external components to find out when reloading should take place. This implementation delegates to the managed controllers. For all of them thecheckForReloading()
method is called, giving them the chance to trigger a reload if necessary. If one of these calls returns true, the result of this method is true, otherwise false.- Specified by:
isReloadingRequired
in interfaceReloadingDetector
- Returns:
- true if a reload operation should be performed, false otherwise
-
reloadingPerformed
public void reloadingPerformed()
Notifies this object that a reload operation has been performed. This method is called afterreloadingRequired()
has returned true. It can be used to reset internal state in order to detect the next reload operation. This implementation resets the reloading state on all managed controllers.- Specified by:
reloadingPerformed
in interfaceReloadingDetector
-
-