Class PeerInfo

java.lang.Object
com.couchbase.lite.PeerInfo

public final class PeerInfo extends Object
Information about a peer during multipeer replication.
  • Field Details

  • Constructor Details

    • PeerInfo

      @Internal("For internal use only: not part of the public API.") public PeerInfo(@NonNull PeerInfo.PeerId peerId, @Nullable X509Certificate certificate, boolean isOnline, @NonNull com.couchbase.lite.internal.core.C4ReplicatorStatus status, @NonNull Set<PeerInfo.PeerId> neighbors)
  • Method Details

    • getPeerId

      @NonNull public PeerInfo.PeerId getPeerId()
      The peer ID.
      Returns:
      the peer ID
    • getCertificate

      @Nullable public X509Certificate getCertificate()
      The peer’s TLS certificate. This will only be available after the peer has been authenticated during the connection process established for replication.
      Returns:
      the peer's TLS certificate, or null if not available
    • isOnline

      public boolean isOnline()
      Whether the peer is online.
      Returns:
      true if the peer is online, false otherwise
    • getReplicatorStatus

      @NonNull public ReplicatorStatus getReplicatorStatus()
      The current status of the replicator.
      Returns:
      the replicator status
    • getNeighbors

      @NonNull public Set<PeerInfo.PeerId> getNeighbors()
      The set of visible neighbors.
      Returns:
      the set of visible neighbors