Package io.datarouter.bytes.kvfile
Class KvFileCollator
java.lang.Object
io.datarouter.bytes.kvfile.KvFileCollator
Collate KvFileEntries using only the binary data, not requiring the objects to be decoded.
Facilitates sorting much more data than fits in memory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAssumes non-null entries.static classAssumes non-null entries.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.datarouter.scanner.Scanner<KvFileEntry>keepAll(List<KvFileReader> readers) Fastest option Merge entries keeping all versions and ops, including duplicates.static io.datarouter.scanner.Scanner<KvFileEntry>pruneAll(List<KvFileReader> readers) Merge entries keeping the latest version.static io.datarouter.scanner.Scanner<KvFileEntry>pruneVersions(List<KvFileReader> readers) Merge entries keeping the latest version.
-
Constructor Details
-
KvFileCollator
public KvFileCollator()
-
-
Method Details
-
keepAll
Fastest option Merge entries keeping all versions and ops, including duplicates. Assumes input is sorted by key+version+op. -
pruneVersions
Merge entries keeping the latest version. Keeps deletes. Assumes input is sorted by key+version+op. If multiple entries have same latest version then selection is undefined. -
pruneAll
Merge entries keeping the latest version. If lastest version is a DELETE then it's omitted. Assumes input is sorted by key+version. If multiple entries have same latest version then selection is undefined.
-