Class FileHandler.AbstractUpdater
java.lang.Object
org.apache.commons.configuration2.io.FileHandler.AbstractUpdater
- Enclosing class:
FileHandler
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidupdate()Performs an update of the enclosing file handler'sFileLocatorobject.protected abstract voidUpdates the passed in builder object to apply the manipulation to be performed by thisUpdater.
-
Constructor Details
-
AbstractUpdater
private AbstractUpdater()
-
-
Method Details
-
update
public void update()Performs an update of the enclosing file handler'sFileLocatorobject. -
updateBuilder
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 theFileLocatorto be manipulated.- Parameters:
builder- the builder for creating an updatedFileLocator
-