Package org.apache.openjpa.util
Interface ChangeTracker
- 
- All Known Subinterfaces:
- CollectionChangeTracker,- MapChangeTracker
 - All Known Implementing Classes:
- AbstractChangeTracker,- AbstractLRSProxyCollection,- AbstractLRSProxyMap,- CollectionChangeTrackerImpl,- DelayedCollectionChangeTrackerImpl,- LRSProxyCollection,- MapChangeTrackerImpl
 
 public interface ChangeTrackerInterface for components that track changes to containers at a fine-grained level. Proxies that use change trackers might have better update performance than non-tracking proxies.- Author:
- Abe White
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.CollectiongetAdded()Return the collection of values that need to be added to the managed container.java.util.CollectiongetChanged()Return the set of elements that have changed.intgetNextSequence()The next element sequence value for this proxy at load time.java.util.CollectiongetRemoved()Return the set of values that need to be removed from the managed container.booleanisTracking()Return true if this tracker has an up-to-date view of all the changes to the container it is managing.voidsetNextSequence(int seq)The maximum element sequence value for this proxy at load time.voidstartTracking()Reset the state of the change tracker, and turn change tracking back on if it has been disabled.voidstopTracking()Tell the tracker to stop tracking changes for its container.
 
- 
- 
- 
Method Detail- 
isTrackingboolean isTracking() Return true if this tracker has an up-to-date view of all the changes to the container it is managing.
 - 
startTrackingvoid startTracking() Reset the state of the change tracker, and turn change tracking back on if it has been disabled.
 - 
stopTrackingvoid stopTracking() Tell the tracker to stop tracking changes for its container.
 - 
getAddedjava.util.Collection getAdded() Return the collection of values that need to be added to the managed container.
 - 
getRemovedjava.util.Collection getRemoved() Return the set of values that need to be removed from the managed container.
 - 
getChangedjava.util.Collection getChanged() Return the set of elements that have changed. In maps, this marks a possible change in value for a key. In collections, this marks an element that has been removed and re-added.
 - 
getNextSequenceint getNextSequence() The next element sequence value for this proxy at load time. If the data store keeps this proxy's data in sequence order but allows holes for removed objects, the implementation can set the next sequence at load time, then retrieve it and start from there for added objects at flush time. This value is set back to 0 if the proxy stops tracking changes. For ordered proxies, it is set to the proxy's size when the proxy starts tracking changes again.
 - 
setNextSequencevoid setNextSequence(int seq) The maximum element sequence value for this proxy at load time. If the data store keeps this proxy's data in sequence order but allows holes for removed objects, the implementation can set the next sequence at load time, then retrieve it and start from there for added objects at flush time. This value is set back to 0 if the proxy stops tracking changes. For ordered proxies, it is set to the proxy's size when the proxy starts tracking changes again.
 
- 
 
-