-
public final class ConfigurationFactoriesKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static DatabaseConfigurationDatabaseConfigurationFactoryprivate final static ReplicatorConfigurationReplicatorConfigurationFactoryprivate final static MessageEndpointListenerConfigurationMessageEndpointListenerConfigurationFactoryprivate final static URLEndpointListenerConfigurationURLEndpointListenerConfigurationFactory
-
Method Summary
Modifier and Type Method Description final DatabaseConfigurationgetDatabaseConfigurationFactory()Configuration factory for new DatabaseConfigurationsUsage: val dbConfig = DatabaseConfigurationFactory.newConfig(... final ReplicatorConfigurationgetReplicatorConfigurationFactory()Configuration factory for new ReplicatorConfigurationsUsage: val replConfig = ReplicatorConfigurationFactory.newConfig(... final MessageEndpointListenerConfigurationgetMessageEndpointListenerConfigurationFactory()<b>ENTERPRISE EDITION API</b><br><br><p> Configuration factory for new MessageEndpointListenerConfigurationsUsage: val endpointListenerConfig = MessageEndpointListenerConfigurationFactory.newConfig(... final URLEndpointListenerConfigurationgetURLEndpointListenerConfigurationFactory()<b>ENTERPRISE EDITION API</b><br><br><p> Configuration factory for new URLEndpointListenerConfigurationsUsage: val endpointListenerConfig = URLEndpointListenerConfigurationFactory.newConfig(... final static DatabaseConfigurationnewConfig(DatabaseConfiguration $self, String databasePath, EncryptionKey encryptionKey)Create a DatabaseConfiguration, overriding the receiver's values with the passed parameters: final static ReplicatorConfigurationnewConfig(ReplicatorConfiguration $self, Endpoint target, Map<out Collection<Collection>, CollectionConfiguration> collections, ReplicatorType type, Boolean continuous, Authenticator authenticator, Map<String, String> headers, X509Certificate pinnedServerCertificate, Integer maxAttempts, Integer maxAttemptWaitTime, Integer heartbeat, Boolean enableAutoPurge, Boolean acceptOnlySelfSignedServerCertificate, Boolean acceptParentDomainCookies)Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge property final static MessageEndpointListenerConfigurationnewConfig(MessageEndpointListenerConfiguration $self, Set<Collection> collections, ProtocolType protocolType)<b>ENTERPRISE EDITION API</b><br><br><p> Create a MessageEndpointListenerConfiguration, overriding the receiver's values with the passed parameters: final static URLEndpointListenerConfigurationnewConfig(URLEndpointListenerConfiguration $self, Set<Collection> collections, String networkInterface, Integer port, Boolean disableTls, TLSIdentity identity, ListenerAuthenticator authenticator, Boolean readOnly, Boolean enableDeltaSync)<b>ENTERPRISE EDITION API</b><br><br><p> Create a URLEndpointListenerConfigurations, overriding the receiver's values with the passed parameters: final static DatabaseConfigurationcreate(DatabaseConfiguration $self, String databasePath, EncryptionKey encryptionKey)Create a DatabaseConfiguration, overriding the receiver's values with the passed parameters: final static ReplicatorConfigurationcreate(ReplicatorConfiguration $self, Database database, Endpoint target, ReplicatorType type, Boolean continuous, Authenticator authenticator, Map<String, String> headers, ByteArray pinnedServerCertificate, List<String> channels, List<String> documentIDs, ReplicationFilter pushFilter, ReplicationFilter pullFilter, ConflictResolver conflictResolver, Integer maxAttempts, Integer maxAttemptWaitTime, Integer heartbeat, Boolean enableAutoPurge, Boolean acceptOnlySelfSignedServerCertificate, Boolean acceptParentDomainCookies)Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge propertyWarning: This factory method configures only the default collection! final static MessageEndpointListenerConfigurationcreate(MessageEndpointListenerConfiguration $self, Database database, ProtocolType protocolType)<b>ENTERPRISE EDITION API</b><br><br><p> Create a MessageEndpointListenerConfiguration, overriding the receiver's values with the passed parameters: final static URLEndpointListenerConfigurationcreate(URLEndpointListenerConfiguration $self, Database database, String networkInterface, Integer port, Boolean disableTls, TLSIdentity identity, ListenerAuthenticator authenticator, Boolean readOnly, Boolean enableDeltaSync)<b>ENTERPRISE EDITION API</b><br><br><p> Create a URLEndpointListenerConfigurations, overriding the receiver's values with the passed parameters: -
-
Method Detail
-
getDatabaseConfigurationFactory
final DatabaseConfiguration getDatabaseConfigurationFactory()
Configuration factory for new DatabaseConfigurations
Usage: val dbConfig = DatabaseConfigurationFactory.newConfig(...)
-
getReplicatorConfigurationFactory
final ReplicatorConfiguration getReplicatorConfigurationFactory()
Configuration factory for new ReplicatorConfigurations
Usage: val replConfig = ReplicatorConfigurationFactory.newConfig(...)
-
getMessageEndpointListenerConfigurationFactory
final MessageEndpointListenerConfiguration getMessageEndpointListenerConfigurationFactory()
<b>ENTERPRISE EDITION API</b><br><br>
<p> Configuration factory for new MessageEndpointListenerConfigurationsUsage: val endpointListenerConfig = MessageEndpointListenerConfigurationFactory.newConfig(...)
-
getURLEndpointListenerConfigurationFactory
final URLEndpointListenerConfiguration getURLEndpointListenerConfigurationFactory()
<b>ENTERPRISE EDITION API</b><br><br>
<p> Configuration factory for new URLEndpointListenerConfigurationsUsage: val endpointListenerConfig = URLEndpointListenerConfigurationFactory.newConfig(...)
-
newConfig
final static DatabaseConfiguration newConfig(DatabaseConfiguration $self, String databasePath, EncryptionKey encryptionKey)
Create a DatabaseConfiguration, overriding the receiver's values with the passed parameters:
- Parameters:
databasePath- The directory in which the database is stored.encryptionKey- ENTERPRISE EDITION API: The database encryption key.
-
newConfig
final static ReplicatorConfiguration newConfig(ReplicatorConfiguration $self, Endpoint target, Map<out Collection<Collection>, CollectionConfiguration> collections, ReplicatorType type, Boolean continuous, Authenticator authenticator, Map<String, String> headers, X509Certificate pinnedServerCertificate, Integer maxAttempts, Integer maxAttemptWaitTime, Integer heartbeat, Boolean enableAutoPurge, Boolean acceptOnlySelfSignedServerCertificate, Boolean acceptParentDomainCookies)
Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:
Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge property
- Parameters:
target- (required) The max size of the log file in bytes.collections- a map of collections to be replicated, to their configurations.type- replicator type: push, pull, or push and pull: default is push and pull.continuous- continuous flag: true for continuous, false by default.authenticator- connection authenticator.headers- extra HTTP headers to send in all requests to the remote target.pinnedServerCertificate- target server's SSL certificate.maxAttempts- max retry attempts after connection failure.maxAttemptWaitTime- max time between retry attempts (exponential backoff).heartbeat- heartbeat interval, in seconds.enableAutoPurge- auto-purge enabled.acceptOnlySelfSignedServerCertificate- ENTERPRISE EDITION API: Whether the replicator will accept all/only self-signed certificates.acceptParentDomainCookies- Advanced: accept cookies for parent domains.
-
newConfig
final static MessageEndpointListenerConfiguration newConfig(MessageEndpointListenerConfiguration $self, Set<Collection> collections, ProtocolType protocolType)
<b>ENTERPRISE EDITION API</b><br><br>
<p> Create a MessageEndpointListenerConfiguration, overriding the receiver's values with the passed parameters:- Parameters:
collections- the local collections.protocolType- (required) data transport type: messages or bytes.
-
newConfig
final static URLEndpointListenerConfiguration newConfig(URLEndpointListenerConfiguration $self, Set<Collection> collections, String networkInterface, Integer port, Boolean disableTls, TLSIdentity identity, ListenerAuthenticator authenticator, Boolean readOnly, Boolean enableDeltaSync)
<b>ENTERPRISE EDITION API</b><br><br>
<p> Create a URLEndpointListenerConfigurations, overriding the receiver's values with the passed parameters:- Parameters:
collections- the local collection.networkInterface- the interface on which to listen: default is 0.0.0.0.port- listener port: default is next available port.disableTls- true to disable TLS: default is false.identity- certs and keys for the listener.authenticator- authenticator.readOnly- true for a read-only connection.enableDeltaSync- true to enable delta sync.
-
create
@Deprecated(message = Use DatabaseConfigurationFactory.newConfig(String?, EncryptionKey?), replaceWith = @ReplaceWith(imports = {}, expression = DatabaseConfigurationFactory.newConfig(String?, EncryptionKey?))) final static DatabaseConfiguration create(DatabaseConfiguration $self, String databasePath, EncryptionKey encryptionKey)
Create a DatabaseConfiguration, overriding the receiver's values with the passed parameters:
- Parameters:
databasePath- The directory in which the database is stored.encryptionKey- ENTERPRISE EDITION API: The database encryption key.
-
create
@Deprecated(message = Use ReplicatorConfigurationFactory.newConfig(Endpoint?, Map<Set<Collection>, CollectionConfiguration?>?, ...), replaceWith = @ReplaceWith(imports = {}, expression = ReplicatorConfigurationFactory.newConfig(Endpoint?, Map<Set<Collection>, CollectionConfiguration?>?, ...))) final static ReplicatorConfiguration create(ReplicatorConfiguration $self, Database database, Endpoint target, ReplicatorType type, Boolean continuous, Authenticator authenticator, Map<String, String> headers, ByteArray pinnedServerCertificate, List<String> channels, List<String> documentIDs, ReplicationFilter pushFilter, ReplicationFilter pullFilter, ConflictResolver conflictResolver, Integer maxAttempts, Integer maxAttemptWaitTime, Integer heartbeat, Boolean enableAutoPurge, Boolean acceptOnlySelfSignedServerCertificate, Boolean acceptParentDomainCookies)
Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:
Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge property
Warning: This factory method configures only the default collection! Using it on a configuration that describes any collections other than the default will loose all information associated with those collections
- Parameters:
database- the local databasetarget- (required) The replication endpoint.type- replicator type: push, pull, or push and pull: default is push and pull.continuous- continuous flag: true for continuous.authenticator- connection authenticator.headers- extra HTTP headers to send in all requests to the remote target.pinnedServerCertificate- target server's SSL certificate.channels- Sync Gateway channel names.documentIDs- IDs of documents to be replicated: default is all documents.pushFilter- filter for pushed documents.pullFilter- filter for pulled documents.conflictResolver- conflict resolver.maxAttempts- max retry attempts after connection failure.maxAttemptWaitTime- max time between retry attempts (exponential backoff).heartbeat- heartbeat interval, in seconds.enableAutoPurge- auto-purge enabled.acceptOnlySelfSignedServerCertificate- ENTERPRISE EDITION API: Whether the replicator will accept all/only self-signed certificates.acceptParentDomainCookies- Advanced: accept cookies for parent domains.
-
create
@Deprecated(message = Use MessageEndpointListenerConfigurationFactory().newConfig(Endpoint?, Set<Collection>?), replaceWith = @ReplaceWith(imports = {}, expression = MessageEndpointListenerConfigurationFactory().newConfig(Endpoint?, Set<Collection>?))) final static MessageEndpointListenerConfiguration create(MessageEndpointListenerConfiguration $self, Database database, ProtocolType protocolType)
<b>ENTERPRISE EDITION API</b><br><br>
<p> Create a MessageEndpointListenerConfiguration, overriding the receiver's values with the passed parameters:- Parameters:
database- the local database.protocolType- (required) data transport type: messages or bytes.
-
create
@Deprecated(message = Use URLEndpointListenerConfigurations().newConfig(Set<Collection>?, ...), replaceWith = @ReplaceWith(imports = {}, expression = URLEndpointListenerConfigurations().newConfig(Set<Collection>?, ...))) final static URLEndpointListenerConfiguration create(URLEndpointListenerConfiguration $self, Database database, String networkInterface, Integer port, Boolean disableTls, TLSIdentity identity, ListenerAuthenticator authenticator, Boolean readOnly, Boolean enableDeltaSync)
<b>ENTERPRISE EDITION API</b><br><br>
<p> Create a URLEndpointListenerConfigurations, overriding the receiver's values with the passed parameters:- Parameters:
database- the local database.networkInterface- the interface on which to listen: default is 0.0.0.0.port- listener port: default is next available port.disableTls- true to disable TLS: default is false.identity- certs and keys for the listener.authenticator- authenticator.readOnly- true for a read-only connection.enableDeltaSync- true to enable delta sync.
-
-
-
-