public class ConcurrentCollectionFactory
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
ConcurrentCollectionFactory() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.Set<T> |
copySetToConcurrent(java.util.Set<T> source) |
static <T> java.util.ArrayList<T> |
createArrayList() |
static <T> BDEQueue<T> |
createBoundedDoubleEndedQueue(int capacity)
Create a new double ended queue (concurrent).
|
static <T,V> java.util.concurrent.ConcurrentHashMap<T,V> |
createConcurrentHashMap() |
static <T> java.util.Set<T> |
createConcurrentHashSet() |
static <T> java.util.concurrent.ConcurrentLinkedQueue<T> |
createConcurrentLinkedQueue() |
static <T> java.util.List<T> |
createConcurrentList() |
static <T> FCQueue<T> |
createFCQueue() |
static <T> java.util.HashSet<T> |
createHashSet()
Create a new hash set
|
static <T> java.util.LinkedList<T> |
createLinkedList() |
static <T> LockFreeQueue<T> |
createLockFreeQueue() |
static <T> LockFreeStack<T> |
createLockFreeStack() |
static <T> UnboundedDEQueue<T> |
createUnboundedDoubleEndedQueue()
Create a new double ended queue (concurrent).
|
protected static <T> void |
doCopyCollection(java.util.Collection<T> source,
java.util.Collection<T> dest) |
static <T> void |
threadSafeListAdd(T item,
java.util.List<T> list) |
static <T> T |
threadSafeListGet(int index,
java.util.List<T> list) |
static <T> T |
threadSafeListRemove(int index,
java.util.List<T> list) |
public static <T> java.util.ArrayList<T> createArrayList()
public static <T> java.util.HashSet<T> createHashSet()
T
- public static <T> java.util.List<T> createConcurrentList()
public static <T> java.util.concurrent.ConcurrentLinkedQueue<T> createConcurrentLinkedQueue()
public static <T,V> java.util.concurrent.ConcurrentHashMap<T,V> createConcurrentHashMap()
public static <T> java.util.Set<T> createConcurrentHashSet()
public static <T> java.util.Set<T> copySetToConcurrent(java.util.Set<T> source)
public static <T> java.util.LinkedList<T> createLinkedList()
public static <T> LockFreeQueue<T> createLockFreeQueue()
public static <T> LockFreeStack<T> createLockFreeStack()
public static <T> UnboundedDEQueue<T> createUnboundedDoubleEndedQueue()
public static <T> BDEQueue<T> createBoundedDoubleEndedQueue(int capacity)
public static <T> FCQueue<T> createFCQueue()
protected static <T> void doCopyCollection(java.util.Collection<T> source, java.util.Collection<T> dest)
public static <T> T threadSafeListGet(int index, java.util.List<T> list)
public static <T> T threadSafeListRemove(int index, java.util.List<T> list)
public static <T> void threadSafeListAdd(T item, java.util.List<T> list)
T
- item
- list
-