Similar to GroupedLazySeq but allows you to specify a max time to wait before processing the current batch
LazySeq Implementation using the Iterator interface (hasNext/next) instead of Traversable's (foreach)
LazySeq Implementation using the Java Iterable interface
LazySeq Implementation using the Java Iterator interface
A Non-Strict Traversable meant to be used for reading resources (Files, InputStreams, etc...) that might not fit into memory and may or may not be re-readable.
A LazySeq producer/consumer pair that uses a BlockingQueue
Helper class that takes a Resource and handles using the resource
Keeps an in-memory buffer gets sorted once a size threshold is passed and written to a temp file.
Keeps an in-memory buffer gets sorted once a size threshold is passed and written to a temp file. This is repeated until result() is called. Data is then read back from the temp files in sorted order.
This should be thread-safe
A builder that lets us build up a temp file that can be read back as a LazySeq.
A builder that lets us build up a temp file that can be read back as a LazySeq. Useful for methods like groupBy, grouped, partition, etc...
Methods are synchronized so this should be thread-safe now
A LazySeq producer/consumer pair that uses a BlockingQueue
I think this is Thread-Safe
2021-02-19 - This was updated to allow passing in an arbitrary BlockingQueue implementation (e.g. an LMDBBlockingDeque for using an off-heap disk-backed queue). I removed the END_OF_QUEUE marker so that the BlockingQueue could be typed as a BlockingQueue[A] instead of an BlockingQueue[AnyRef] to make serialization in LMDBBlockingDeque work better.
It looks like there is a lot of cleanup potential in this class. After some original threading problems around handling exceptions in the Producer and Consumer threads it looks like I went a little overboard on error handling. There is probably room for a lot of simplification.