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 Object
implements ReloadingDetector
A specialized implementation of the
ReloadingDetector
interface which operates on a collection of
ReloadingController
objects. The methods defined by the ReloadingDetector
interface are delegated to
the managed controllers.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CombinedReloadingController
A reference to the owning combined reloading controller. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofMultiReloadingControllerDetector
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether all criteria for a reload operation are fulfilled.void
Notifies this object that a reload operation has been performed.
-
Field Details
-
owner
A reference to the owning combined reloading controller.
-
-
Constructor Details
-
MultiReloadingControllerDetector
Creates a new instance ofMultiReloadingControllerDetector
.- Parameters:
owner
- the owner
-
-
Method Details
-
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
-