Skip navigation links

Package org.sodeac.common.snapdeque

A SnapshotableDeque provides an implementation of Deque.

See: Description

Package org.sodeac.common.snapdeque Description

A SnapshotableDeque provides an implementation of Deque. Iterating through deque requires creating a DequeSnapshot. A snapshot is immutable regardless of possible changes in source deque.

Unlike CopyOnWriteArrayList a SnapshotableDeque never creates a deep copy of content, neither when modifying, nor when reading or creating a snapshot. Iterating through a snapshot requires no locks inside of snapshot or source deque. The goal is to prevent a big performance slump for very large deques. This is realized by versionable linked lists with different branches inside of deque.

It is recommend to close snapshots after use to remove unneeded version-branches.

Since:
1.0
Version:
1.0
Author:
Sebastian Palarus
Skip navigation links

Copyright © 2020. All rights reserved.