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 thePubSubService
.- Since:
- 9.3
-
-
Field Summary
Fields Modifier and Type Field Description protected T
bufferedInvalidations
-
Fields inherited from class org.nuxeo.runtime.pubsub.AbstractPubSubBroker
DISCRIMINATOR_SEP, discriminatorBytes, topic
-
-
Constructor Summary
Constructors Constructor Description AbstractPubSubInvalidationsAccumulator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this broker and releases resources.void
initialize(String topic, String discriminator)
Initializes the broker.abstract T
newInvalidations()
Constructs new empty invalidations, of typeAbstractPubSubInvalidationsAccumulator
.void
receivedMessage(T invalidations)
Callback implementing the delivery of a message from another node.T
receiveInvalidations()
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 Detail
-
bufferedInvalidations
protected volatile T extends SerializableAccumulableInvalidations bufferedInvalidations
-
-
Method Detail
-
newInvalidations
public abstract T newInvalidations()
Constructs new empty invalidations, of typeAbstractPubSubInvalidationsAccumulator
.
-
initialize
public void initialize(String topic, String discriminator)
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
public void sendInvalidations(T invalidations)
Sends invalidations to other nodes.
-
receivedMessage
public void receivedMessage(T invalidations)
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
public T receiveInvalidations()
Receives invalidations from other nodes.
-
-