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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDefines aNamedCollection.Optionfor asserting the type of values used with aNamedTopic. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValueTypeAssertionWhen used warnings will be issued where types are configured but not used.static final ValueTypeAssertionWhen used no type checking will occur and no warnings will be generated. -
Method Summary
Modifier and TypeMethodDescriptionvoidassertTypeSafety(String sName, TopicMapping mapping) Asserts the type compatibility of a topic given theTopicMappingthat defines the topic.static <V> ValueTypeAssertion<V> Obtains aValueTypeAssertionthat allows topic to be acquired without type-checking, warnings or log messages.static <V> ValueTypeAssertion<V> Obtains aValueTypeAssertionthat allows topic to be acquired and assigned to a rawNamedTopicreference.static <V> ValueTypeAssertion<V> Obtains aValueTypeAssertionthat 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 theTopicMappingthat defines the topic.- Parameters:
sName- the name of the topicmapping- theResourceMapping- Throws:
IllegalArgumentException- when type used with theValueTypeAssertionare illegal according to the configuration
-
withType
Obtains aValueTypeAssertionthat 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 aValueTypeAssertionthat allows topic to be acquired and assigned to a rawNamedTopicreference. A debug log message will be raised for topics that have been configured with specific types.- Returns:
- a
ValueTypeAssertion
-
withoutTypeChecking
Obtains aValueTypeAssertionthat allows topic to be acquired without type-checking, warnings or log messages.- Returns:
- a
ValueTypeAssertion
-