Interface CdbDiffIterate
- All Superinterfaces:
 ConfIterate
CdbDiffIterate interface should be implemented
 by any class whose instances are intended to process or iterate
 through a set of changes.
 A particular instance of the implemented class
 should be provided to call to
 CdbSubscription.diffIterate(int,CdbDiffIterate,EnumSet,Object).
 
The iterate method will be called  for each element
 that has been modified and matches the subscription.
 
The iterate callback receives the
 ConfObject array kp which uniquely identifies which
 node in the data tree that is affected, the operation, and optionally the
 values it has before and after the
 transaction. The op parameter gives the modification as:
 
DiffIterateOperFlag.MOP_CREATEDThe list entry, presence container, or leaf of type empty given bykphas been created.DiffIterateOperFlag.MOP_DELETEDThe list entry, presence container, or optional leaf given bykphas been deleted.If the subscription was triggered because an ancestor was deleted, the
iteratemethod will not called at all if the delete was above the subscription point. However if the flagDiffIterateFlags.ITER_WANT_ANCESTOR_DELETEis passed todiffIteratethen deletes that trigger a descendant subscription will also generate a call toiterate, and in this casekpwill be the path that was actually deleted.DiffIterateOperFlag.MOP_MODIFIEDA descendant of the list entry given bykphas been modified.DiffIterateOperFlag.MOP_VALUE_SETThe value of the leaf given bykphas been set tonew_value.DiffIterateOperFlag.MOP_MOVED_AFTERThe list entry given bykp, in an ordered-by user list, has been moved. Ifnew_valueis null, the entry has been moved first in the list, otherwise it has been moved after the entry given bynew. In this casenew_valueidentifying an entry in the list.
iterate returns DiffIterateResultFlag.ITER_STOP,
  no more iteration is done. If iterate returns
  DiffIterateResultFlag.ITER_RECURSE iteration continues with all
  children to the node. If iterate returns
  DiffIterateResultFlag.ITER_CONTINUE iteration ignores the
  children to the node (if any), and continues with the node's sibling.- 
Method Summary
Modifier and TypeMethodDescriptioniterate(ConfObject[] kp, DiffIterateOperFlag op, ConfObject oldValue, ConfObject newValue, Object initstate) Iterate through a set of changes 
- 
Method Details
- 
iterate
DiffIterateResultFlag iterate(ConfObject[] kp, DiffIterateOperFlag op, ConfObject oldValue, ConfObject newValue, Object initstate) Iterate through a set of changes- Parameters:
 kp- A keypath identifies which node in the data tree that was affectedop- Operation code (MOP_CREATED,MOP_DELETED,MOP_VALUE_SET, MOP_MOVED_AFTER)oldValue- The old value is set to a subtype ofConfValuewhen leaf value has been changed (MOP_VALUE_SET)newValue- The new value is set to a subtype ofConfValuewhen a leaf have been set,MOP_VALUE_SET. When theopisMOP_MOVED_AFTERthenewValuetype isConfKey.initstate- An arbitrary object passed todiffIteratemethod.
 
 -