org.apache.solr.update

## Class PeerSync

- java.lang.Object
- - org.apache.solr.update.PeerSync

-     public class PeerSync
      extends Object

  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PeerSync.PeerSyncResult`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Comparator<Long>` | `absComparator`

  - ### Constructor Summary

    Constructors
    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)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### absComparator

          public static Comparator<Long> absComparator

  - ### Constructor Detail

    - #### PeerSync

          public PeerSync(SolrCore core,
                          List<String> replicas,
                          int nUpdates)

    - #### PeerSync

          public PeerSync(SolrCore core,
                          List<String> replicas,
                          int nUpdates,
                          boolean cantReachIsSuccess,
                          boolean getNoVersionsIsSuccess)

    - #### PeerSync

          public PeerSync(SolrCore core,
                          List<String> replicas,
                          int nUpdates,
                          boolean cantReachIsSuccess,
                          boolean getNoVersionsIsSuccess,
                          boolean onlyIfActive,
                          boolean doFingerprint)

  - ### Method Detail

    - #### setStartingVersions

          public void setStartingVersions(List<Long> startingVersions)

      optional list of updates we had before possibly receiving new updates

    - #### percentile

          public long percentile(List<Long> arr,
                                 float frac)

    - #### sync

          public PeerSync.PeerSyncResult sync()

      Returns true if peer sync was successful, meaning that this core may be considered to have the latest updates. It does not mean that the remote replica is in sync with us.

    - #### sync

          public static void sync(SolrCore core,
                                  List<String> replicas,
                                  int nUpdates)

      Requests and applies recent updates from peers

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.