Class FileHandler.Updater

java.lang.Object
org.apache.commons.configuration2.io.FileHandler.Updater
Enclosing class:
FileHandler

private abstract class FileHandler.Updater extends Object
An internal class that performs all update operations of the handler's FileLocator in a safe way even if there is concurrent access. This class implements anon-blocking algorithm for replacing the immutable FileLocator instance stored in an atomic reference by a manipulated instance. (If we already had lambdas, this could be done without a class in a more elegant way.)
  • Constructor Details

    • Updater

      private Updater()
  • Method Details

    • update

      public void update()
      Performs an update of the enclosing file handler's FileLocator object.
    • updateBuilder

      protected abstract void updateBuilder(FileLocator.FileLocatorBuilder builder)
      Updates the passed in builder object to apply the manipulation to be performed by this Updater. The builder has been setup with the former content of the FileLocator to be manipulated.
      Parameters:
      builder - the builder for creating an updated FileLocator