|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.cache.impl.CacheProxyUtil
public final class CacheProxyUtil
Static util methods for ICache implementations.
CacheProxy| Field Summary | |
|---|---|
static int |
AWAIT_COMPLETION_TIMEOUT_SECONDS
|
| Method Summary | ||
|---|---|---|
protected static int |
getPartitionId(NodeEngine nodeEngine,
Data key)
|
|
static
|
validateConfiguredKeyType(Class<K> keyType,
K key)
Validates the key with key type. |
|
static
|
validateConfiguredTypes(CacheConfig cacheConfig,
K key)
Validates that the configured key matches the provided key. |
|
static
|
validateConfiguredTypes(CacheConfig cacheConfig,
K key,
V value)
Validates the configured key and value types matches the provided key, value types. |
|
static
|
validateConfiguredTypes(CacheConfig cacheConfig,
K key,
V value1,
V value2)
Validates the configured key and value types matches the provided key, value types. |
|
static
|
validateConfiguredValueType(Class<V> valueType,
V value)
Validates the value with value type. |
|
static
|
validateNotNull(K key)
Validates that a key is not null. |
|
static
|
validateNotNull(K key,
V value)
Validates that key, value pair are both not null. |
|
static
|
validateNotNull(K key,
V value1,
V value2)
Validates that key and multi values are not null. |
|
static
|
validateNotNull(Map<? extends K,? extends V> map)
This validator ensures that no key or value is null in the provided map. |
|
static
|
validateNotNull(Set<? extends K> keys)
Validates that none of the keys are null in set. |
|
static void |
validateResults(Map<Integer,Object> results)
Cache clear response validator, loop on results to validate that no exception exists on the result map. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int AWAIT_COMPLETION_TIMEOUT_SECONDS
| Method Detail |
|---|
public static void validateResults(Map<Integer,Object> results)
results - map of CacheClearResponse.
protected static int getPartitionId(NodeEngine nodeEngine,
Data key)
public static <K> void validateNotNull(K key)
K - the type of key.key - the key to be validated.
NullPointerException - if provided key is null.
public static <K,V> void validateNotNull(K key,
V value)
K - the type of key.V - the type of value.key - the key to be validated.value - the value to be validated.
NullPointerException - if key or value is null.
public static <K,V> void validateNotNull(K key,
V value1,
V value2)
K - the type of key.V - the type of value.key - the key to be validated.value1 - first value to be validated.value2 - second value to be validated.
NullPointerException - if key or any value is null.public static <K> void validateNotNull(Set<? extends K> keys)
K - the type of key.keys - set of keys to be validated.
NullPointerException - if provided key set contains a null key.public static <K,V> void validateNotNull(Map<? extends K,? extends V> map)
K - the type of key.V - the type of value.map - the map to be validated.
NullPointerException - if provided map contains a null key or value in the map.
public static <K> void validateConfiguredTypes(CacheConfig cacheConfig,
K key)
throws ClassCastException
K - the type of key.cacheConfig - Cache configuration.key - the key to be validated with its type.
ClassCastException - if the provided key does not match with configured type.
public static <K,V> void validateConfiguredTypes(CacheConfig cacheConfig,
K key,
V value)
throws ClassCastException
K - the type of key.V - the type of value.cacheConfig - Cache configuration.key - the key to be validated.value - the value to be validated.
ClassCastException - if the provided key or value do not match with configured types.
public static <K,V> void validateConfiguredTypes(CacheConfig cacheConfig,
K key,
V value1,
V value2)
throws ClassCastException
K - the type of key.V - the type of value.cacheConfig - Cache configuration.key - the key to be validated.value1 - value to be validated.value2 - value to be validated.
ClassCastException - if the provided key or value do not match with configured types.
public static <K> void validateConfiguredKeyType(Class<K> keyType,
K key)
throws ClassCastException
K - the type of key.keyType - key class.key - key to be validated.
ClassCastException - if the provided key do not match with keyType.
public static <V> void validateConfiguredValueType(Class<V> valueType,
V value)
throws ClassCastException
V - the type of value.valueType - value class.value - value to be validated.
ClassCastException - if the provided value do not match with valueType.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||