T - the element type.public class CopyOnWriteSortedCache<T extends Comparable<T>> extends Object implements Iterable<T>
Set semantics.
This implementation supports add/remove and replace all of elements.
Note that because this implementation uses JVM-local locks, it is unsuitable for use in a clustered environment. It should therefore not be used by core JIRA for data that needs to be consistent across the cluster.
| Constructor and Description |
|---|
CopyOnWriteSortedCache(Iterable<T> elements) |
| Modifier and Type | Method and Description |
|---|---|
T |
add(T t) |
List<T> |
asList()
An unmodifiable
List view of the underlying data that does not change. |
SortedSet<T> |
asSortedSet()
An unmodifiable
SortedSet view of the underlying data that does not change. |
Iterator<T> |
iterator() |
void |
remove(T t) |
void |
replaceAll(Iterable<T> elements) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void remove(T t)
public List<T> asList()
List view of the underlying data that does not change.List containing all the elements as at the time the call was made.public SortedSet<T> asSortedSet()
SortedSet view of the underlying data that does not change.SortedSet containing all the elements as at the time the call was made.Copyright © 2002-2021 Atlassian. All Rights Reserved.