Record Class SnapshotMetrics

java.lang.Object
java.lang.Record
org.elasticsearch.repositories.SnapshotMetrics

public record SnapshotMetrics(LongCounter snapshotsStartedCounter, LongCounter snapshotsCompletedCounter, DoubleHistogram snapshotsDurationHistogram, LongCounter shardsStartedCounter, LongCounter shardsCompletedCounter, DoubleHistogram shardsDurationHistogram, LongCounter blobsUploadedCounter, LongCounter bytesUploadedCounter, LongCounter uploadDurationCounter, LongCounter uploadReadDurationCounter, LongCounter createThrottleDurationCounter, LongCounter restoreThrottleDurationCounter, MeterRegistry meterRegistry) extends Record
  • Field Details

  • Constructor Details

    • SnapshotMetrics

      public SnapshotMetrics(MeterRegistry meterRegistry)
    • SnapshotMetrics

      public SnapshotMetrics(LongCounter snapshotsStartedCounter, LongCounter snapshotsCompletedCounter, DoubleHistogram snapshotsDurationHistogram, LongCounter shardsStartedCounter, LongCounter shardsCompletedCounter, DoubleHistogram shardsDurationHistogram, LongCounter blobsUploadedCounter, LongCounter bytesUploadedCounter, LongCounter uploadDurationCounter, LongCounter uploadReadDurationCounter, LongCounter createThrottleDurationCounter, LongCounter restoreThrottleDurationCounter, MeterRegistry meterRegistry)
      Creates an instance of a SnapshotMetrics record class.
      Parameters:
      snapshotsStartedCounter - the value for the snapshotsStartedCounter record component
      snapshotsCompletedCounter - the value for the snapshotsCompletedCounter record component
      snapshotsDurationHistogram - the value for the snapshotsDurationHistogram record component
      shardsStartedCounter - the value for the shardsStartedCounter record component
      shardsCompletedCounter - the value for the shardsCompletedCounter record component
      shardsDurationHistogram - the value for the shardsDurationHistogram record component
      blobsUploadedCounter - the value for the blobsUploadedCounter record component
      bytesUploadedCounter - the value for the bytesUploadedCounter record component
      uploadDurationCounter - the value for the uploadDurationCounter record component
      uploadReadDurationCounter - the value for the uploadReadDurationCounter record component
      createThrottleDurationCounter - the value for the createThrottleDurationCounter record component
      restoreThrottleDurationCounter - the value for the restoreThrottleDurationCounter record component
      meterRegistry - the value for the meterRegistry record component
  • Method Details

    • createSnapshotShardsInProgressMetric

      public void createSnapshotShardsInProgressMetric(Supplier<Collection<LongWithAttributes>> shardSnapshotsInProgressObserver)
    • createSnapshotShardsByStateMetric

      public void createSnapshotShardsByStateMetric(Supplier<Collection<LongWithAttributes>> shardSnapshotsByStatusObserver)
    • createSnapshotsByStateMetric

      public void createSnapshotsByStateMetric(Supplier<Collection<LongWithAttributes>> snapshotsByStatusObserver)
    • createAttributesMap

      public static Map<String,Object> createAttributesMap(ProjectId projectId, RepositoryMetadata meta)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • snapshotsStartedCounter

      public LongCounter snapshotsStartedCounter()
      Returns the value of the snapshotsStartedCounter record component.
      Returns:
      the value of the snapshotsStartedCounter record component
    • snapshotsCompletedCounter

      public LongCounter snapshotsCompletedCounter()
      Returns the value of the snapshotsCompletedCounter record component.
      Returns:
      the value of the snapshotsCompletedCounter record component
    • snapshotsDurationHistogram

      public DoubleHistogram snapshotsDurationHistogram()
      Returns the value of the snapshotsDurationHistogram record component.
      Returns:
      the value of the snapshotsDurationHistogram record component
    • shardsStartedCounter

      public LongCounter shardsStartedCounter()
      Returns the value of the shardsStartedCounter record component.
      Returns:
      the value of the shardsStartedCounter record component
    • shardsCompletedCounter

      public LongCounter shardsCompletedCounter()
      Returns the value of the shardsCompletedCounter record component.
      Returns:
      the value of the shardsCompletedCounter record component
    • shardsDurationHistogram

      public DoubleHistogram shardsDurationHistogram()
      Returns the value of the shardsDurationHistogram record component.
      Returns:
      the value of the shardsDurationHistogram record component
    • blobsUploadedCounter

      public LongCounter blobsUploadedCounter()
      Returns the value of the blobsUploadedCounter record component.
      Returns:
      the value of the blobsUploadedCounter record component
    • bytesUploadedCounter

      public LongCounter bytesUploadedCounter()
      Returns the value of the bytesUploadedCounter record component.
      Returns:
      the value of the bytesUploadedCounter record component
    • uploadDurationCounter

      public LongCounter uploadDurationCounter()
      Returns the value of the uploadDurationCounter record component.
      Returns:
      the value of the uploadDurationCounter record component
    • uploadReadDurationCounter

      public LongCounter uploadReadDurationCounter()
      Returns the value of the uploadReadDurationCounter record component.
      Returns:
      the value of the uploadReadDurationCounter record component
    • createThrottleDurationCounter

      public LongCounter createThrottleDurationCounter()
      Returns the value of the createThrottleDurationCounter record component.
      Returns:
      the value of the createThrottleDurationCounter record component
    • restoreThrottleDurationCounter

      public LongCounter restoreThrottleDurationCounter()
      Returns the value of the restoreThrottleDurationCounter record component.
      Returns:
      the value of the restoreThrottleDurationCounter record component
    • meterRegistry

      public MeterRegistry meterRegistry()
      Returns the value of the meterRegistry record component.
      Returns:
      the value of the meterRegistry record component