Class PeerSyncWithLeader

java.lang.Object
org.apache.solr.update.PeerSyncWithLeader
All Implemented Interfaces:
AutoCloseable, SolrMetricProducer

public class PeerSyncWithLeader extends Object implements SolrMetricProducer
  • Field Details

  • Constructor Details

    • PeerSyncWithLeader

      public PeerSyncWithLeader(SolrCore core, String leaderUrl, int nUpdates)
  • Method Details

    • getSolrMetricsContext

      public SolrMetricsContext getSolrMetricsContext()
      Description copied from interface: SolrMetricProducer
      Implementations should return the context used in SolrMetricProducer.initializeMetrics(SolrMetricsContext, Attributes) to ensure proper cleanup of metrics at the end of the life-cycle of this component. This should be the child context if one was created, or null if the parent context was used.
      Specified by:
      getSolrMetricsContext in interface SolrMetricProducer
    • initializeMetrics

      public void initializeMetrics(SolrMetricsContext parentContext, io.opentelemetry.api.common.Attributes attributes)
      Description copied from interface: SolrMetricProducer
      Implementation should initialize all metrics to a SolrMetricsContext Registry/MeterProvider with Attributes as the common set of attributes that will be attached to every metric that is initialized for that class/component
      Specified by:
      initializeMetrics in interface SolrMetricProducer
      Parameters:
      parentContext - The registry that the component will initialize metrics to
      attributes - Base set of attributes that will be bound to all metrics for that component
    • sync

      public PeerSync.PeerSyncResult sync(List<Long> startingVersions)
      Sync with leader
      Parameters:
      startingVersions - : recent versions on startup
      Returns:
      result of PeerSync with leader