public abstract class ReplicatorBuilder<S,T,E>
extends java.lang.Object
Object
Modifier and Type | Class and Description |
---|---|
static class |
ReplicatorBuilder.Pull
A Pull Replication Builder
|
static class |
ReplicatorBuilder.Push
A Push Replication Builder
|
Constructor and Description |
---|
ReplicatorBuilder() |
Modifier and Type | Method and Description |
---|---|
E |
addRequestInterceptors(com.cloudant.http.HttpConnectionRequestInterceptor... interceptors)
Variable argument version of
addRequestInterceptors(List) |
E |
addRequestInterceptors(java.util.List<com.cloudant.http.HttpConnectionRequestInterceptor> interceptors)
Adds interceptors to the list of request interceptors to use for each request made by this replication.
|
E |
addResponseInterceptors(com.cloudant.http.HttpConnectionResponseInterceptor... interceptors)
Variable argument version of
addResponseInterceptors(List) |
E |
addResponseInterceptors(java.util.List<com.cloudant.http.HttpConnectionResponseInterceptor> interceptors)
Adds interceptors to the list of response interceptors to use for each response received by this replication.
|
abstract Replicator |
build()
Builds a replicator based on the configuration set.
|
E |
from(S source)
Sets the source database for the replication
|
static ReplicatorBuilder.Pull |
pull()
Creates a pull replication builder.
|
static ReplicatorBuilder.Push |
push()
Creates a
ReplicatorBuilder.Push replication builder. |
Replicator |
start()
Builds a replicator by calling
build() and then Replicator.start()
on the replicator returned. |
E |
to(T target)
Sets the target database for the replication
|
E |
withId(int id) |
public E to(T target)
target
- The target for the replicationReplicatorBuilder
public E from(S source)
source
- The source database for the replicationReplicatorBuilder
public E withId(int id)
public E addRequestInterceptors(com.cloudant.http.HttpConnectionRequestInterceptor... interceptors)
addRequestInterceptors(List)
interceptors
- The request interceptors to add.ReplicatorBuilder
public E addRequestInterceptors(java.util.List<com.cloudant.http.HttpConnectionRequestInterceptor> interceptors)
interceptors
- The request interceptors to add.ReplicatorBuilder
public E addResponseInterceptors(com.cloudant.http.HttpConnectionResponseInterceptor... interceptors)
addResponseInterceptors(List)
interceptors
- The response interceptors to add.ReplicatorBuilder
public E addResponseInterceptors(java.util.List<com.cloudant.http.HttpConnectionResponseInterceptor> interceptors)
interceptors
- The response interceptors to add.ReplicatorBuilder
public Replicator start()
build()
and then Replicator.start()
on the replicator returned.public abstract Replicator build()
Replicator
that will carry out the replicationpublic static ReplicatorBuilder.Pull pull()
ReplicatorBuilder.Pull
replication builderpublic static ReplicatorBuilder.Push push()
ReplicatorBuilder.Push
replication builder.