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
ConstructorsConstructorDescriptionWithTypesAssertion(Class<K> keyClass, Class<V> valueClass) ConstructsTypeAssertion.WithTypesAssertion -
Method Summary
Modifier and TypeMethodDescriptionbooleanassertTypeSafety(String sCacheName, CacheMapping cacheMapping, boolean fLog) Asserts the type compatibility of a named cache given theCacheMappingthat defines the cache.booleanGet Key ClassNameGet Value ClassNameinthashCode()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 theCacheMappingthat defines the cache.- Specified by:
assertTypeSafetyin interfaceTypeAssertion<K,V> - Parameters:
sCacheName- the name of the cachecacheMapping- theCacheMappingfLog- when true, log warning if typing mismatch betweenCacheMappingconfiguration 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 theTypeAssertionare 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
-