A deque that specializes in providing persistence of binary objects to disk. Any object placed in the deque will be persisted to disk asynchronously. Objects placed in the deque can be persisted synchronously by invoking sync. The files backing this deque all start with a nonce provided at construction time followed by a segment index that is stored in the filename. Files grow to a maximum size of 64 megabytes and then a new segment is created. The index starts at 0. Segments are deleted once all objects from the segment have been polled and all the containers returned by poll have been discarded. Push is implemented by creating new segments at the head of the deque containing the objects to be pushed.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.