Package org.nuxeo.runtime.pubsub
Class AbstractPubSubInvalidationsAccumulator<T extends SerializableAccumulableInvalidations>
java.lang.Object
org.nuxeo.runtime.pubsub.AbstractPubSubBroker<T>
org.nuxeo.runtime.pubsub.AbstractPubSubInvalidationsAccumulator<T>
- Direct Known Subclasses:
DBSPubSubInvalidator
,VCSPubSubInvalidator
public abstract class AbstractPubSubInvalidationsAccumulator<T extends SerializableAccumulableInvalidations>
extends AbstractPubSubBroker<T>
Encapsulates invalidations management through the
PubSubService
.- Since:
- 9.3
-
Field Summary
Fields inherited from class org.nuxeo.runtime.pubsub.AbstractPubSubBroker
DISCRIMINATOR_SEP, discriminatorBytes, topic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this broker and releases resources.void
initialize
(String topic, String discriminator) Initializes the broker.abstract T
Constructs new empty invalidations, of typeAbstractPubSubInvalidationsAccumulator
.void
receivedMessage
(T invalidations) Callback implementing the delivery of a message from another node.Receives invalidations from other nodes.void
sendInvalidations
(T invalidations) Sends invalidations to other nodes.Methods inherited from class org.nuxeo.runtime.pubsub.AbstractPubSubBroker
deserialize, scanDiscriminator, sendMessage, subscriber
-
Field Details
-
bufferedInvalidations
-
-
Constructor Details
-
AbstractPubSubInvalidationsAccumulator
public AbstractPubSubInvalidationsAccumulator()
-
-
Method Details
-
newInvalidations
Constructs new empty invalidations, of typeAbstractPubSubInvalidationsAccumulator
. -
initialize
Description copied from class:AbstractPubSubBroker
Initializes the broker.- Overrides:
initialize
in classAbstractPubSubBroker<T extends SerializableAccumulableInvalidations>
- Parameters:
topic
- the topicdiscriminator
- the discriminator
-
close
public void close()Description copied from class:AbstractPubSubBroker
Closes this broker and releases resources.- Overrides:
close
in classAbstractPubSubBroker<T extends SerializableAccumulableInvalidations>
-
sendInvalidations
Sends invalidations to other nodes. -
receivedMessage
Description copied from class:AbstractPubSubBroker
Callback implementing the delivery of a message from another node.- Specified by:
receivedMessage
in classAbstractPubSubBroker<T extends SerializableAccumulableInvalidations>
- Parameters:
invalidations
- the received message
-
receiveInvalidations
Receives invalidations from other nodes.
-