V
- the value typepublic interface UniversalTopicData<V> extends TopicData
DataType
s.
To create such data use
TopicDataFactory.newUniversalData
.
Modifier and Type | Method and Description |
---|---|
com.pushtechnology.diffusion.client.topics.details.TopicType |
getTopicType()
Returns the topic type.
|
void |
initialise(V value)
Initialise the topic data.
|
void |
update(V value)
Updates the topic to the specified value.
|
getDeltaEncoding, getLoadEncoding, getLoadMessage, getLoadMessage, getTopic, getType, hasSubscribers, isCommand, isLockedByCurrentThread, isPaged, isPublishing, isRouting, isService, lock, setDeltaEncoding, setLoadEncoding, unlock
com.pushtechnology.diffusion.client.topics.details.TopicType getTopicType()
void initialise(V value) throws APIException
This can be used to set a value in the data before it is attached to a topic.
If this is not used before attaching the data to the topic then the topic will have no initial value.
value
- the initial valueAPIException
- if the data is already attached to a topic or the
content fails validationvoid update(V value) throws APIException
This will set the topic value to the current value and if the new value is different, either the new value or a delta (if the topic can publish deltas and the delta would be cheaper to send) will be published to all subscribers.
This is an atomic action which locks the topic.
value
- the new valueAPIException
- if a failure occursCopyright © 2016 Push Technology Ltd. All Rights Reserved.