Tape 2 is a major release that focusses on simplifying the API. Tape 2 also adopts a new file format that allows QueueFile to grow beyond 4GB.
- New:
remove(int)
allows atomic removal of multiple elements. - Improvement:
QueueFile
now implements theCloseable
andIterable
interface. - Improvement: Simplified
ObjectQueue
API.ObjectQueue
now implements theCloseable
andIterable
interface.ObjectQueue.Listener
has been removed. - New: Iterator API allows iterating queue items and stopping iteration early.
- Improvement: New file format that allows QueueFile to grow beyond 4GB. Tape 2 can continue to operate on the v1 format. You can also force the legacy format by using the
forceLegacy
option.
Note: Existing queues are currently not migrated to the newer format. This will be added in a future release.
close()
method onFileObjectQueue
now closes underlyingQueueFile
.- Fix: Properly move and zero out bytes during copy opertaions.
- Fix: Prevent corruption when expanding a perfectly saturated queue.
- New:
QueueFile
instances throw anIOException
on creation if a corrupt header is found.
- New: Zero out old records in
clear()
andremove()
.
- Fix: Ensure -1 is returned when no more bytes are available.
- Fix: Correct read to use position offset in certain cases where it would otherwise use 0.
- Allow a
TaskQueue
'sTaskInjector
to benull
. TaskQueue
listener is now called with a reference to the queue instance rather than its delegate.
Initial release.