Class PropertyMapManager
java.lang.Object
net.infonode.properties.propertymap.PropertyMapManager
Utility class for performing multiple modifications to
PropertyMap
's and merging change notifications to
optimize performance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Begins a batch operation.void
endBatch()
Ends a batch operation.static PropertyMapManager
Returns the only instance of this class.static void
Executes a method inside abeginBatch()
-endBatch()
pair.
-
Constructor Details
-
PropertyMapManager
public PropertyMapManager()
-
-
Method Details
-
getInstance
Returns the only instance of this class.- Returns:
- the only instance of this class
-
runBatch
Executes a method inside abeginBatch()
-endBatch()
pair. SeebeginBatch()
for more information. It's safe to call other batch methods from insideRunnable.run()
.- Parameters:
runnable
- the runnable to invoke
-
beginBatch
public void beginBatch()Begins a batch operation. This stores and merges all change notifications occuring in all property maps untilendBatch()
is called. Each call to this method MUST be followed by a call toendBatch()
. This method can be called an unlimited number of times without callingendBatch()
in between, but each call must have a corresponding call toendBatch()
. Only when exiting from the outermostendBatch()
the changes be propagated to the listeners. -
endBatch
public void endBatch()Ends a batch operation. SeebeginBatch()
for more information.
-