Class PublicationTransportHandler.PublicationContext
java.lang.Object
org.elasticsearch.core.AbstractRefCounted
org.elasticsearch.cluster.coordination.PublicationTransportHandler.PublicationContext
- All Implemented Interfaces:
org.elasticsearch.core.RefCounted
- Enclosing class:
- PublicationTransportHandler
public class PublicationTransportHandler.PublicationContext
extends org.elasticsearch.core.AbstractRefCounted
Publishing a cluster state typically involves sending the same cluster state (or diff) to every node, so the work of diffing,
serializing, and compressing the state can be done once and the results shared across publish requests. The
PublicationContext
implements this sharing. It's ref-counted: the initial reference is released by the coordinator when
a state (or diff) has been sent to every node, every transmitted diff also holds a reference in case it needs to retry with a full
state.-
Field Summary
Fields inherited from class org.elasticsearch.core.AbstractRefCounted
ALREADY_CLOSED_MESSAGE
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
sendApplyCommit
(DiscoveryNode destination, ApplyCommitRequest applyCommitRequest, ActionListener<TransportResponse.Empty> listener) void
sendPublishRequest
(DiscoveryNode destination, PublishRequest publishRequest, ActionListener<PublishWithJoinResponse> listener) Methods inherited from class org.elasticsearch.core.AbstractRefCounted
alreadyClosed, decRef, hasReferences, incRef, of, refCount, touch, tryIncRef
-
Method Details
-
sendPublishRequest
public void sendPublishRequest(DiscoveryNode destination, PublishRequest publishRequest, ActionListener<PublishWithJoinResponse> listener) -
sendApplyCommit
public void sendApplyCommit(DiscoveryNode destination, ApplyCommitRequest applyCommitRequest, ActionListener<TransportResponse.Empty> listener) -
closeInternal
protected void closeInternal()- Specified by:
closeInternal
in classorg.elasticsearch.core.AbstractRefCounted
-