Package com.tangosol.net.cache
Class TypeAssertion.WithTypesAssertion<K,V>
- java.lang.Object
-
- com.tangosol.net.cache.TypeAssertion.WithTypesAssertion<K,V>
-
- All Implemented Interfaces:
TypeAssertion<K,V>
,NamedMap.Option
- Enclosing interface:
- TypeAssertion<K,V>
public static class TypeAssertion.WithTypesAssertion<K,V> extends Object implements TypeAssertion<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.net.cache.TypeAssertion
TypeAssertion.WithTypesAssertion<K,V>
-
-
Field Summary
-
Fields inherited from interface com.tangosol.net.cache.TypeAssertion
WITH_RAW_TYPES, WITHOUT_TYPE_CHECKING
-
-
Constructor Summary
Constructors Constructor Description WithTypesAssertion(Class<K> keyClass, Class<V> valueClass)
ConstructsTypeAssertion.WithTypesAssertion
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
assertTypeSafety(String sCacheName, CacheMapping cacheMapping, boolean fLog)
Asserts the type compatibility of a named cache given theCacheMapping
that defines the cache.boolean
equals(Object o)
String
getKeyClassName()
Get Key ClassNameString
getValueClassName()
Get Value ClassNameint
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.tangosol.net.cache.TypeAssertion
assertTypeSafety
-
-
-
-
Constructor Detail
-
WithTypesAssertion
public WithTypesAssertion(Class<K> keyClass, Class<V> valueClass)
ConstructsTypeAssertion.WithTypesAssertion
- Parameters:
keyClass
- non-null key typevalueClass
- non-null value type
-
-
Method Detail
-
assertTypeSafety
public boolean assertTypeSafety(String sCacheName, CacheMapping cacheMapping, boolean fLog) throws IllegalArgumentException
Asserts the type compatibility of a named cache given theCacheMapping
that defines the cache.- Specified by:
assertTypeSafety
in interfaceTypeAssertion<K,V>
- Parameters:
sCacheName
- the name of the cachecacheMapping
- theCacheMapping
fLog
- when true, log warning if typing mismatch betweenCacheMapping
configuration and thisTypeAssertion
; specifically, one uses raw types and the other asserts specific types.- Returns:
- false if warning logged about the assertion, true otherwise.
- Throws:
IllegalArgumentException
- when types used with theTypeAssertion
are illegal according to the configuration
-
getKeyClassName
public String getKeyClassName()
Get Key ClassName- Returns:
- key class name
-
getValueClassName
public String getValueClassName()
Get Value ClassName- Returns:
- Value class name
-
-