Package org.apache.openjpa.util
Interface MapChangeTracker
-
- All Superinterfaces:
ChangeTracker
- All Known Implementing Classes:
AbstractLRSProxyMap
,MapChangeTrackerImpl
public interface MapChangeTracker extends ChangeTracker
Change tracker that can be used for maps. If the user calls any mutating methods on the map that do not have an equivalent in this change tracker, then you must callChangeTracker.stopTracking()
after applying the operation to the map. The collections returned fromChangeTracker.getAdded()
andChangeTracker.getRemoved()
will be collections of keys to add/remove.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
added(java.lang.Object key, java.lang.Object val)
Record that the given entry was added to the map.void
changed(java.lang.Object key, java.lang.Object oldVal, java.lang.Object newVal)
Record that the given entry was altered.boolean
getTrackKeys()
Whether to track keys or values.void
removed(java.lang.Object key, java.lang.Object val)
Record that the given entry was removed from the map.void
setTrackKeys(boolean keys)
Whether to track keys or values.-
Methods inherited from interface org.apache.openjpa.util.ChangeTracker
getAdded, getChanged, getNextSequence, getRemoved, isTracking, setNextSequence, startTracking, stopTracking
-
-
-
-
Method Detail
-
getTrackKeys
boolean getTrackKeys()
Whether to track keys or values. Defaults to keys. If you set to values, it is assumed there is a 1-1 correlation between keys and values in this map.
-
setTrackKeys
void setTrackKeys(boolean keys)
Whether to track keys or values. Defaults to keys. If you set to values, it is assumed there is a 1-1 correlation between keys and values in this map.
-
added
void added(java.lang.Object key, java.lang.Object val)
Record that the given entry was added to the map.
-
removed
void removed(java.lang.Object key, java.lang.Object val)
Record that the given entry was removed from the map.
-
changed
void changed(java.lang.Object key, java.lang.Object oldVal, java.lang.Object newVal)
Record that the given entry was altered.
-
-