Class FileHandler.AbstractUpdater
- java.lang.Object
-
- org.apache.commons.configuration2.io.FileHandler.AbstractUpdater
-
- Enclosing class:
- FileHandler
private abstract class FileHandler.AbstractUpdater extends java.lang.Object
An internal class that performs all update operations of the handler'sFileLocator
in a safe way even if there is concurrent access. This class implements anon-blocking algorithm for replacing the immutableFileLocator
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 Summary
Constructors Modifier Constructor Description private
AbstractUpdater()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
update()
Performs an update of the enclosing file handler'sFileLocator
object.protected abstract void
updateBuilder(FileLocator.FileLocatorBuilder builder)
Updates the passed in builder object to apply the manipulation to be performed by thisUpdater
.
-
-
-
Method Detail
-
update
public void update()
Performs an update of the enclosing file handler'sFileLocator
object.
-
updateBuilder
protected abstract void updateBuilder(FileLocator.FileLocatorBuilder builder)
Updates the passed in builder object to apply the manipulation to be performed by thisUpdater
. The builder has been setup with the former content of theFileLocator
to be manipulated.- Parameters:
builder
- the builder for creating an updatedFileLocator
-
-