Package com.tangosol.net
Interface ValueTypeAssertion<V>
- Type Parameters:
V
- the type of the topic values
- All Superinterfaces:
NamedCollection.Option
- All Known Implementing Classes:
ValueTypeAssertion.WithValueTypeAssertion
Defines a
NamedCollection.Option
for asserting the type
of values used with a NamedTopic
.- Since:
- Coherence 14.1.1
- Author:
- jk 2015.09.15
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Defines aNamedCollection.Option
for asserting the type of values used with aNamedTopic
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ValueTypeAssertion
When used warnings will be issued where types are configured but not used.static final ValueTypeAssertion
When used no type checking will occur and no warnings will be generated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
assertTypeSafety
(String sName, TopicMapping mapping) Asserts the type compatibility of a topic given theTopicMapping
that defines the topic.static <V> ValueTypeAssertion
<V> Obtains aValueTypeAssertion
that allows topic to be acquired without type-checking, warnings or log messages.static <V> ValueTypeAssertion
<V> Obtains aValueTypeAssertion
that allows topic to be acquired and assigned to a rawNamedTopic
reference.static <V> ValueTypeAssertion
<V> Obtains aValueTypeAssertion
that asserts the specified types are configured for a topic.
-
Field Details
-
WITHOUT_TYPE_CHECKING
When used no type checking will occur and no warnings will be generated. -
WITH_RAW_TYPES
When used warnings will be issued where types are configured but not used.
-
-
Method Details
-
assertTypeSafety
Asserts the type compatibility of a topic given theTopicMapping
that defines the topic.- Parameters:
sName
- the name of the topicmapping
- theResourceMapping
- Throws:
IllegalArgumentException
- when type used with theValueTypeAssertion
are illegal according to the configuration
-
withType
Obtains aValueTypeAssertion
that asserts the specified types are configured for a topic.- Parameters:
clsElement
- the desired type of the elements within the topic- Returns:
- a
ValueTypeAssertion
-
withRawTypes
Obtains aValueTypeAssertion
that allows topic to be acquired and assigned to a rawNamedTopic
reference. A debug log message will be raised for topics that have been configured with specific types.- Returns:
- a
ValueTypeAssertion
-
withoutTypeChecking
Obtains aValueTypeAssertion
that allows topic to be acquired without type-checking, warnings or log messages.- Returns:
- a
ValueTypeAssertion
-