public class PeerSync extends Object implements SolrMetricProducer
Modifier and Type | Class and Description |
---|---|
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) |
PeerSync(SolrCore core,
List<String> replicas,
int nUpdates,
boolean cantReachIsSuccess,
boolean getNoVersionsIsSuccess) |
PeerSync(SolrCore core,
List<String> replicas,
int nUpdates,
boolean cantReachIsSuccess,
boolean getNoVersionsIsSuccess,
boolean onlyIfActive,
boolean doFingerprint) |
Modifier and Type | Method and Description |
---|---|
void |
initializeMetrics(SolrMetricManager manager,
String registry,
String scope)
Initializes metrics specific to this producer
|
long |
percentile(List<Long> arr,
float frac) |
void |
setStartingVersions(List<Long> startingVersions)
optional list of updates we had before possibly receiving new updates
|
PeerSync.PeerSyncResult |
sync()
Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates.
|
static void |
sync(SolrCore core,
List<String> replicas,
int nUpdates)
Requests and applies recent updates from peers
|
public static Comparator<Long> absComparator
public static final String METRIC_SCOPE
public PeerSync(SolrCore core, List<String> replicas, int nUpdates, boolean cantReachIsSuccess, boolean getNoVersionsIsSuccess)
public void initializeMetrics(SolrMetricManager manager, String registry, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
manager
- an instance of SolrMetricManager
registry
- registry name where metrics are registeredscope
- scope of the metrics (eg. handler name) to separate metrics of
instances of the same component executing in different contextspublic void setStartingVersions(List<Long> startingVersions)
public PeerSync.PeerSyncResult sync()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.