public class PeerSync extends Object implements SolrMetricProducer
Modifier and Type | Class and Description |
---|---|
static class |
PeerSync.MissedUpdatesFinder
Helper class for doing comparison ourUpdates and other replicas's updates to find the updates that we missed
|
static class |
PeerSync.MissedUpdatesRequest
Result of
PeerSync.MissedUpdatesFinder |
static class |
PeerSync.PeerSyncResult |
Modifier and Type | Field and Description |
---|---|
static Comparator<Long> |
absComparator |
static String |
METRIC_SCOPE |
Constructor and Description |
---|
PeerSync(SolrCore core,
List<String> replicas,
int nUpdates,
boolean cantReachIsSuccess) |
PeerSync(SolrCore core,
List<String> replicas,
int nUpdates,
boolean cantReachIsSuccess,
boolean onlyIfActive,
boolean doFingerprint) |
Modifier and Type | Method and Description |
---|---|
void |
initializeMetrics(SolrMetricManager manager,
String registry,
String tag,
String scope)
Initializes metrics specific to this producer
|
static long |
percentile(List<Long> arr,
float frac) |
PeerSync.PeerSyncResult |
sync()
Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getSolrMetricsContext, getUniqueMetricTag, initializeMetrics
public static Comparator<Long> absComparator
public static final String METRIC_SCOPE
public PeerSync(SolrCore core, List<String> replicas, int nUpdates, boolean cantReachIsSuccess)
public void initializeMetrics(SolrMetricManager manager, String registry, String tag, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
manager
- an instance of SolrMetricManager
registry
- registry name where metrics are registeredtag
- a symbolic tag that represents this instance of the producer,
or a group of related instances that have the same life-cycle. This tag is
used when managing life-cycle of some metrics.scope
- scope of the metrics (eg. handler name) to separate metrics of components with
the same implementation but different scope.public PeerSync.PeerSyncResult sync()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.