Interface ReloadingDetector
-
- All Known Implementing Classes:
CombinedReloadingController.MultiReloadingControllerDetector
,FileHandlerReloadingDetector
,ManagedReloadingDetector
,VFSFileHandlerReloadingDetector
public interface ReloadingDetector
An interface to be implemented by objects which can detect whether a reload operation is required.
This interface is used by a
ReloadingController
object. When a reloading check is to be performed, it is delegated to a concrete implementation. The implementation decides whether (specific) criteria for a reload are fulfilled, so that the controller can react accordingly.This interface does not define how a check for a reload is performed. This is completely up to a concrete implementation. There is just one method for executing the check and one method to notify the
ReloadingDetector
that the reload actually happened; this method can be used to reset the internal state so that the conditions for the next reload can be detected.When used together with
ReloadingController
an implementation does not have to be thread-safe. The controller takes care for synchronization so that an instance is accessed by a single thread only.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
isReloadingRequired
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.- Returns:
- true if a reload operation should be performed, false otherwise
-
reloadingPerformed
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.
-
-