public final class DistributedPrimitives extends Object
DistributedPrimitives.| Modifier and Type | Method and Description |
|---|---|
static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> |
newCachingMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
Creates an instance of
AsyncConsistentMap that caches entries on get. |
static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> |
newMeteredMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
Creates an instance of
AsyncConsistentMap that records metrics for all its operations. |
static <E> org.onosproject.store.service.AsyncDistributedSet<E> |
newSetFromMap(org.onosproject.store.service.AsyncConsistentMap<E,Boolean> map)
Creates an instance of
AsyncDistributedSet that is backed by a AsyncConsistentMap. |
static <K1,V1,K2,V2> |
newTranscodingMap(org.onosproject.store.service.AsyncConsistentMap<K2,V2> map,
Function<K1,K2> keyEncoder,
Function<K2,K1> keyDecoder,
Function<V1,V2> valueEncoder,
Function<V2,V1> valueDecoder)
Creates an instance of
AsyncConsistentMap that transforms operations inputs and applies them
to corresponding operation in a different typed map and returns the output after reverse transforming it. |
static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> |
newUnmodifiableMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
Creates an instance of
AsyncConsistentMap that disallows updates. |
public static <E> org.onosproject.store.service.AsyncDistributedSet<E> newSetFromMap(org.onosproject.store.service.AsyncConsistentMap<E,Boolean> map)
AsyncDistributedSet that is backed by a AsyncConsistentMap.E - set element typemap - backing mappublic static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> newMeteredMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
AsyncConsistentMap that records metrics for all its operations.K - map key typeV - map value typemap - map whose operations are to be meteredpublic static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> newCachingMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
AsyncConsistentMap that caches entries on get.K - map key typeV - map value typemap - backing mappublic static <K,V> org.onosproject.store.service.AsyncConsistentMap<K,V> newUnmodifiableMap(org.onosproject.store.service.AsyncConsistentMap<K,V> map)
AsyncConsistentMap that disallows updates.K - map key typeV - map value typemap - backing mappublic static <K1,V1,K2,V2> org.onosproject.store.service.AsyncConsistentMap<K1,V1> newTranscodingMap(org.onosproject.store.service.AsyncConsistentMap<K2,V2> map,
Function<K1,K2> keyEncoder,
Function<K2,K1> keyDecoder,
Function<V1,V2> valueEncoder,
Function<V2,V1> valueDecoder)
AsyncConsistentMap that transforms operations inputs and applies them
to corresponding operation in a different typed map and returns the output after reverse transforming it.K1 - returned map key typeK2 - input map key typeV1 - returned map value typeV2 - input map key typemap - backing mapkeyEncoder - transformer for key type of returned map to key type of input mapkeyDecoder - transformer for key type of input map to key type of returned mapvalueEncoder - transformer for value type of returned map to value type of input mapvalueDecoder - transformer for value type of input map to value type of returned mapCopyright © 2016. All rights reserved.