Class ClusterStatePublicationEvent

java.lang.Object
org.elasticsearch.cluster.ClusterStatePublicationEvent

public class ClusterStatePublicationEvent extends Object
Represents a cluster state update computed by the MasterService for publication to the cluster. If publication is successful then this creates a ClusterChangedEvent which is applied on every node.
  • Constructor Details

    • ClusterStatePublicationEvent

      public ClusterStatePublicationEvent(String summary, ClusterState oldState, ClusterState newState, long computationTimeMillis, long publicationStartTimeMillis)
  • Method Details

    • getSummary

      public String getSummary()
    • getOldState

      public ClusterState getOldState()
    • getNewState

      public ClusterState getNewState()
    • getComputationTimeMillis

      public long getComputationTimeMillis()
    • getPublicationStartTimeMillis

      public long getPublicationStartTimeMillis()
    • setPublicationContextConstructionElapsedMillis

      public void setPublicationContextConstructionElapsedMillis(long millis)
    • setPublicationCommitElapsedMillis

      public void setPublicationCommitElapsedMillis(long millis)
    • setPublicationCompletionElapsedMillis

      public void setPublicationCompletionElapsedMillis(long millis)
    • setMasterApplyElapsedMillis

      public void setMasterApplyElapsedMillis(long millis)
    • getPublicationContextConstructionElapsedMillis

      public long getPublicationContextConstructionElapsedMillis()
      Returns:
      how long in milliseconds it took to construct the publication context, which includes computing a cluster state diff and serializing the cluster states for future transmission.
    • getPublicationCommitElapsedMillis

      public long getPublicationCommitElapsedMillis()
      Returns:
      how long in milliseconds it took to commit the publication, i.e. the elapsed time from the publication start until the master receives publish responses from a majority of master nodes indicating that the state has been received and persisted there.
    • getPublicationCompletionElapsedMillis

      public long getPublicationCompletionElapsedMillis()
      Returns:
      how long in milliseconds it took to complete the publication, i.e. the elapsed time from the publication start until all nodes except the master have applied the cluster state.
    • getMasterApplyElapsedMillis

      public long getMasterApplyElapsedMillis()
      Returns:
      how long in milliseconds it took for the master to apply the cluster state, which happens after publication completion.
    • maybeGetPublicationContextConstructionElapsedMillis

      public long maybeGetPublicationContextConstructionElapsedMillis()
      Returns:
      how long in milliseconds it took to construct the publication context, which includes computing a cluster state diff and serializing the cluster states for future transmission, or zero if not set.
    • maybeGetPublicationCommitElapsedMillis

      public long maybeGetPublicationCommitElapsedMillis()
      Returns:
      how long in milliseconds it took to commit the publication, i.e. the elapsed time from the publication start until the master receives publish responses from a majority of master nodes indicating that the state has been received and persisted there, or zero if not set.
    • maybeGetPublicationCompletionElapsedMillis

      public long maybeGetPublicationCompletionElapsedMillis()
      Returns:
      how long in milliseconds it took to complete the publication, i.e. the elapsed time from the publication start until all nodes except the master have applied the cluster state, or zero if not set.
    • maybeGetMasterApplyElapsedMillis

      public long maybeGetMasterApplyElapsedMillis()
      Returns:
      how long in milliseconds it took for the master to apply the cluster state, which happens after publication completion, or zero if not set.