Package com.couchbase.lite
Class MultipeerReplicatorConfiguration.Builder
java.lang.Object
com.couchbase.lite.MultipeerReplicatorConfiguration.Builder
- Enclosing class:
 - MultipeerReplicatorConfiguration
 
The builder for MultipeerReplicatorConfigurations.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the MultipeerReplicatorConfiguration.The peer authenticator.Returns the set of collections with their configurations.The peer identity.The peer group ID.setAuthenticator(MultipeerCertificateAuthenticator authenticator) Set the peer authenticator.setCollections(Collection<MultipeerCollectionConfiguration> collections) Sets the collections to replicate, each with its own configuration, such as filters and a custom conflict resolver.setIdentity(TLSIdentity identity) Set the peer identity.setPeerGroupID(String groupID) Sets the peer group ID. 
- 
Constructor Details
- 
Builder
public Builder()Creates a new builder. - 
Builder
Clone an existing configuration.- Parameters:
 config- A multipeer replicator configuration to copy.
 
 - 
 - 
Method Details
- 
getPeerGroupID
The peer group ID.- Returns:
 - The peer group ID.
 
 - 
setPeerGroupID
Sets the peer group ID.- Parameters:
 groupID- The peer group ID.- Returns:
 - This builder.
 
 - 
getIdentity
The peer identity.- Returns:
 - The peer identity.
 
 - 
setIdentity
Set the peer identity.Note The identity’s certificate must be both server and client certificate.
- Parameters:
 identity- The peer identity.- Returns:
 - This builder.
 
 - 
getAuthenticator
The peer authenticator.- Returns:
 - The peer authenticator.
 
 - 
setAuthenticator
@NonNull public MultipeerReplicatorConfiguration.Builder setAuthenticator(@NonNull MultipeerCertificateAuthenticator authenticator) Set the peer authenticator.- Parameters:
 authenticator- The peer authenticator.- Returns:
 - This builder.
 
 - 
getCollections
Returns the set of collections with their configurations.- Returns:
 - Copies of the current collection configurations.
 
 - 
setCollections
@NonNull public MultipeerReplicatorConfiguration.Builder setCollections(@NonNull Collection<MultipeerCollectionConfiguration> collections) Sets the collections to replicate, each with its own configuration, such as filters and a custom conflict resolver.If custom configuration is not needed, use
MultipeerCollectionConfiguration.fromCollections(java.util.Collection)to create configurations directly from a collection ofCollectioninstances.- Parameters:
 collections- A collection ofMultipeerCollectionConfigurationinstances representing the collections and their configurations.- Returns:
 - This builder.
 
 - 
build
Build the MultipeerReplicatorConfiguration.- Returns:
 - A new, configured MultipeerReplicatorConfiguration.
 
 
 -