K - the type of the cache entry keysV - the type of the cache entry values
public interface TypeAssertion<K,V>
| Modifier and Type | Interface and Description |
|---|---|
static class |
TypeAssertion.WithTypesAssertion<K,V> |
| Modifier and Type | Field and Description |
|---|---|
static TypeAssertion |
WITH_RAW_TYPES
When used warnings will be issued where types are configured but not used.
|
static TypeAssertion |
WITHOUT_TYPE_CHECKING
When used no type checking will occur and no warnings will be generated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
assertTypeSafety(String sCacheName, CacheMapping cacheMapping)
Asserts the type compatibility of a named cache given the
CacheMapping that defines the cache. |
static <K,V> TypeAssertion<K,V> |
withoutTypeChecking()
Obtains a
TypeAssertion that allows NamedCaches to be acquired without type-checking, warnings or log messages. |
static TypeAssertion |
withRawTypes()
Obtains a
TypeAssertion that allows NamedCaches to be acquired and assigned to a raw NamedCache reference. |
static <K,V> TypeAssertion<K,V> |
withTypes(Class<K> clsKey, Class<V> clsValue)
Obtains a
TypeAssertion that asserts the specified types are configured for a cache. |
static final TypeAssertion WITHOUT_TYPE_CHECKING
static final TypeAssertion WITH_RAW_TYPES
boolean assertTypeSafety(String sCacheName, CacheMapping cacheMapping) throws IllegalArgumentException
CacheMapping that defines the cache.sCacheName - the name of the cachecacheMapping - the CacheMappingIllegalArgumentException - when types used with the TypeAssertion are illegal according to the configurationstatic <K,V> TypeAssertion<K,V> withTypes(Class<K> clsKey, Class<V> clsValue)
TypeAssertion that asserts the specified types are configured for a cache.clsKey - the desired key typeclsValue - the desired value typeTypeAssertionstatic TypeAssertion withRawTypes()
TypeAssertion that allows NamedCaches to be acquired and assigned to a raw NamedCache reference. A debug log message will be raised for caches that have been configured with specific types.TypeAssertionstatic <K,V> TypeAssertion<K,V> withoutTypeChecking()
TypeAssertion that allows NamedCaches to be acquired without type-checking, warnings or log messages.TypeAssertion