Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.4.1 generated on May 30 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.util
Interface ChangeTracker

All Known Implementing Classes:
  AbstractLRSProxyCollection, AbstractLRSProxyMap

public interface ChangeTracker

Interface 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.

Method Summary
`void` | `added(Object val)` Notify the tracker that the given object was added.
`void` | `changed(Object val)` Notify the tracker that the given object was changed.
`Collection` | `getAdded()` Return the collection of values that need to be added to the managed container.
`Collection` | `getChanged()` Return the set of elements that have changed.
`int` | `getNextSequence()` The next element sequence value for this proxy at load time.
`Collection` | `getRemoved()` Return the set of values that need to be removed from the managed container.
`boolean` | `isTracking()` Return true if this tracker has an up-to-date view of all the changes to the container it is managing.
`void` | `removed(Object val)` Notify the tracker that the given object was removed.
`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.

Method Detail

### isTracking

    public boolean isTracking()

  Return true if this tracker has an up-to-date view of all the changes to the container it is managing.

### startTracking

    public void startTracking()

  Reset the state of the change tracker, and turn change tracking back on if it has been disabled.

### stopTracking

    public void stopTracking()

  Tell the tracker to stop tracking changes for its container.

### getAdded

    public Collection getAdded()

  Return the collection of values that need to be added to the managed container.

### getRemoved

    public Collection getRemoved()

  Return the set of values that need to be removed from the managed container.

### getChanged

    public 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.

### added

    public void added(Object val)

  Notify the tracker that the given object was added.

### removed

    public void removed(Object val)

  Notify the tracker that the given object was removed.

### changed

    public void changed(Object val)

  Notify the tracker that the given object was changed.

### getNextSequence

    public int 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.

### setNextSequence

    public void 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.4.1 generated on May 30 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.