Package org.eclipse.sisu.inject
Class Soft
- java.lang.Object
-
- org.eclipse.sisu.inject.Soft
-
public final class Soft extends Object
Utility methods for dealing withSoftReference
collections.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
ConcurrentMap<K,V>concurrentKeys()
static <K,V>
ConcurrentMap<K,V>concurrentKeys(int capacity, int concurrency)
static <K,V>
ConcurrentMap<K,V>concurrentValues()
static <K,V>
ConcurrentMap<K,V>concurrentValues(int capacity, int concurrency)
static <T> Collection<T>
elements()
static <T> Collection<T>
elements(int capacity)
static <K,V>
Map<K,V>keys()
static <K,V>
Map<K,V>keys(int capacity)
static <K,V>
Map<K,V>values()
static <K,V>
Map<K,V>values(int capacity)
-
-
-
Method Detail
-
elements
public static <T> Collection<T> elements()
- Returns:
Collection
whose elements are kept alive withSoftReference
s
-
elements
public static <T> Collection<T> elements(int capacity)
- Parameters:
capacity
- The initial capacity- Returns:
Collection
whose elements are kept alive withSoftReference
s
-
keys
public static <K,V> Map<K,V> keys()
- Returns:
Map
whose keys are kept alive withSoftReference
s
-
keys
public static <K,V> Map<K,V> keys(int capacity)
- Parameters:
capacity
- The initial capacity- Returns:
Map
whose keys are kept alive withSoftReference
s
-
concurrentKeys
public static <K,V> ConcurrentMap<K,V> concurrentKeys()
- Returns:
ConcurrentMap
whose keys are kept alive withSoftReference
s
-
concurrentKeys
public static <K,V> ConcurrentMap<K,V> concurrentKeys(int capacity, int concurrency)
- Parameters:
capacity
- The initial capacityconcurrency
- The concurrency level- Returns:
ConcurrentMap
whose keys are kept alive withSoftReference
s
-
values
public static <K,V> Map<K,V> values()
- Returns:
Map
whose values are kept alive withSoftReference
s
-
values
public static <K,V> Map<K,V> values(int capacity)
- Parameters:
capacity
- The initial capacity- Returns:
Map
whose values are kept alive withSoftReference
s
-
concurrentValues
public static <K,V> ConcurrentMap<K,V> concurrentValues()
- Returns:
ConcurrentMap
whose values are kept alive withSoftReference
s
-
concurrentValues
public static <K,V> ConcurrentMap<K,V> concurrentValues(int capacity, int concurrency)
- Parameters:
capacity
- The initial capacityconcurrency
- The concurrency level- Returns:
ConcurrentMap
whose values are kept alive withSoftReference
s
-
-