Interface ArtifactWalk.KeyVisitor
- Enclosing interface:
ArtifactWalk
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
One enumerated key. A visitor failure stops the current worker's segment but leaves its claim to expire and
resume from the last committed cursor, so a crash never loses the pass.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbeforeCheckpoint(String cursor) Called immediately before the walk durably commitscursoras processed - every checkpoint stride and at segment completion (cursorisnullfor a segment that held no keys) - the visitor's moment to flush its own buffered derived writes.voidCalled once per key, in ascending lexicographic order within the current segment's range.
-
Method Details
-
visit
Called once per key, in ascending lexicographic order within the current segment's range.- Throws:
IOException
-
beforeCheckpoint
Called immediately before the walk durably commitscursoras processed - every checkpoint stride and at segment completion (cursorisnullfor a segment that held no keys) - the visitor's moment to flush its own buffered derived writes. The cursor lands only after this returns, so a consumer that flushes here is never resumed past an item whose derived write died in a buffer: a flush failure leaves the previous cursor standing, and the re-visit replays exactly what was lost. A visitor that writes through per item needs nothing; the default does nothing.- Throws:
IOException
-