Package com.apple.foundationdb.record
Interface RecordCursorVisitor
-
@API(EXPERIMENTAL) public interface RecordCursorVisitor
A hierarchical visitor for record cursor trees designed mostly to allow tests to gather information without adding invasive query methods to theRecordCursor
interface. Note that the "ordering" of children of eachRecordCursor
is determined by individual implementors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
visitEnter(RecordCursor<?> cursor)
Called on nodes in the record cursor tree in visit pre-order of the depth-first traversal of the tree.boolean
visitLeave(RecordCursor<?> cursor)
Called on nodes in the record cursor tree in visit post-order of the depth-first traversal of the tree.
-
-
-
Method Detail
-
visitEnter
boolean visitEnter(RecordCursor<?> cursor)
Called on nodes in the record cursor tree in visit pre-order of the depth-first traversal of the tree. That is, as each node is visited for the first time,visitEnter()
is called on that node.- Parameters:
cursor
- the cursor to visit- Returns:
true
if the children ofcursor
should be visited, andfalse
if they should not be visited
-
visitLeave
boolean visitLeave(RecordCursor<?> cursor)
Called on nodes in the record cursor tree in visit post-order of the depth-first traversal of the tree. That is, as each node is visited for the last time (after all of its children have been visited, if applicable),visitLeave()
is called on that node.- Parameters:
cursor
- the cursor to visit- Returns:
true
if the subsequent siblings of thecursor
should be visited, andfalse
otherwise
-
-