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
ConstructorDescriptionWithTypesAssertion
(Class<K> keyClass, Class<V> valueClass) ConstructsTypeAssertion.WithTypesAssertion
-
Method Summary
Modifier and TypeMethodDescriptionboolean
assertTypeSafety
(String sCacheName, CacheMapping cacheMapping, boolean fLog) Asserts the type compatibility of a named cache given theCacheMapping
that defines the cache.boolean
Get Key ClassNameGet Value ClassNameint
hashCode()
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 Details
-
WithTypesAssertion
ConstructsTypeAssertion.WithTypesAssertion
- Parameters:
keyClass
- non-null key typevalueClass
- non-null value type
-
-
Method Details
-
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
Get Key ClassName- Returns:
- key class name
-
getValueClassName
Get Value ClassName- Returns:
- Value class name
-
equals
-
hashCode
public int hashCode() -
toString
-