public abstract class AbstractChangeTracker extends java.lang.Object implements ChangeTracker
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection |
add
Collection of added items.
|
protected java.util.Collection |
change
Collection of changed items.
|
protected java.util.Collection |
rem
Collection of removed items.
|
| Constructor and Description |
|---|
AbstractChangeTracker()
Constructor; supply configuration.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
add(java.lang.Object val)
Mark the given value as added.
|
protected void |
added(java.lang.Object val)
Notify the tracker that the given object was added.
|
protected abstract void |
change(java.lang.Object val)
Mark the given value as changed.
|
protected void |
changed(java.lang.Object val)
Notify the tracker that the given object was changed.
|
java.util.Collection |
getAdded()
Return the collection of values that need to be added to the managed
container.
|
boolean |
getAutoOff()
Whether to automatically stop tracking when the number of changes
exceeds the container size.
|
java.util.Collection |
getChanged()
Return the set of elements that have changed.
|
int |
getNextSequence()
The next element sequence value for this proxy at load time.
|
java.util.Collection |
getRemoved()
Return the set of values that need to be removed from the managed
container.
|
protected int |
initialSequence()
Return the initial sequence value for this proxy.
|
boolean |
isTracking()
Return true if this tracker has an up-to-date view of all the changes
to the container it is managing.
|
protected java.util.Set |
newSet()
Create a new set for storing adds/removes/changes.
|
protected abstract void |
remove(java.lang.Object val)
Mark the given value as removed.
|
protected void |
removed(java.lang.Object val)
Notify the tracker that the given object was removed.
|
protected void |
reset()
Reset the state of the tracker.
|
void |
setAutoOff(boolean autoOff)
Whether to automatically stop tracking when the number of changes
exceeds the container size.
|
void |
setNextSequence(int seq)
The maximum element sequence value for this proxy at load time.
|
void |
startTracking()
Reset the state of the change tracker, and turn change tracking back
on if it has been disabled.
|
void |
stopTracking()
Tell the tracker to stop tracking changes for its container.
|
protected java.util.Collection add
protected java.util.Collection rem
protected java.util.Collection change
public AbstractChangeTracker()
public boolean getAutoOff()
public void setAutoOff(boolean autoOff)
public boolean isTracking()
ChangeTrackerisTracking in interface ChangeTrackerpublic void startTracking()
ChangeTrackerstartTracking in interface ChangeTrackerprotected int initialSequence()
public void stopTracking()
ChangeTrackerstopTracking in interface ChangeTrackerprotected void reset()
public java.util.Collection getAdded()
ChangeTrackergetAdded in interface ChangeTrackerpublic java.util.Collection getRemoved()
ChangeTrackergetRemoved in interface ChangeTrackerpublic java.util.Collection getChanged()
ChangeTrackergetChanged in interface ChangeTrackerprotected void added(java.lang.Object val)
protected abstract void add(java.lang.Object val)
protected void removed(java.lang.Object val)
protected abstract void remove(java.lang.Object val)
protected void changed(java.lang.Object val)
protected abstract void change(java.lang.Object val)
public int getNextSequence()
ChangeTrackergetNextSequence in interface ChangeTrackerpublic void setNextSequence(int seq)
ChangeTrackersetNextSequence in interface ChangeTrackerprotected java.util.Set newSet()
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.