Package com.couchbase.lite.internal.core
Class C4Replicator
- java.lang.Object
-
- com.couchbase.lite.internal.core.C4NativePeer
-
- com.couchbase.lite.internal.core.C4Replicator
-
- All Implemented Interfaces:
AutoCloseable
public class C4Replicator extends C4NativePeer
There are two things that need protection in the class:-
Messages sent to it from native code: This object proxies those messages out to
various listeners. Until a replicator object is removed from the REVERSE_LOOKUP_TABLE
forwarding such a message must work.
Calls to the native object: These should work as long as the peer handle is non-zero.
This object must be careful never to forward a call to a native object once that object has been freed.
Instances of this class are created using static factory methods
WARNING! This class and its members are referenced by name, from native code.
-
-
Field Summary
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Set<String>
getPendingDocIDs()
C4ReplicatorStatus
getStatus()
boolean
isDocumentPending(String docId)
void
setHostReachable(boolean reachable)
void
setOptions(byte[] options)
void
setProgressLevel(int level)
void
start(boolean restart)
void
stop()
String
toString()
-
-
-
Field Detail
-
WEBSOCKET_SCHEME
public static final String WEBSOCKET_SCHEME
- See Also:
- Constant Field Values
-
WEBSOCKET_SECURE_CONNECTION_SCHEME
public static final String WEBSOCKET_SECURE_CONNECTION_SCHEME
- See Also:
- Constant Field Values
-
MESSAGE_SCHEME
public static final String MESSAGE_SCHEME
- See Also:
- Constant Field Values
-
C4_REPLICATOR_SCHEME_2
public static final String C4_REPLICATOR_SCHEME_2
- See Also:
- Constant Field Values
-
C4_REPLICATOR_TLS_SCHEME_2
public static final String C4_REPLICATOR_TLS_SCHEME_2
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_DOC_IDS
public static final String REPLICATOR_OPTION_DOC_IDS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_CHANNELS
public static final String REPLICATOR_OPTION_CHANNELS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_FILTER
public static final String REPLICATOR_OPTION_FILTER
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_FILTER_PARAMS
public static final String REPLICATOR_OPTION_FILTER_PARAMS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_SKIP_DELETED
public static final String REPLICATOR_OPTION_SKIP_DELETED
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_NO_INCOMING_CONFLICTS
public static final String REPLICATOR_OPTION_NO_INCOMING_CONFLICTS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_OUTGOING_CONFLICTS
public static final String REPLICATOR_OPTION_OUTGOING_CONFLICTS
- See Also:
- Constant Field Values
-
REPLICATOR_CHECKPOINT_INTERVAL
public static final String REPLICATOR_CHECKPOINT_INTERVAL
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_REMOTE_DB_UNIQUE_ID
public static final String REPLICATOR_OPTION_REMOTE_DB_UNIQUE_ID
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_PROGRESS_LEVEL
public static final String REPLICATOR_OPTION_PROGRESS_LEVEL
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_DISABLE_DELTAS
public static final String REPLICATOR_OPTION_DISABLE_DELTAS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_MAX_RETRIES
public static final String REPLICATOR_OPTION_MAX_RETRIES
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_MAX_RETRY_INTERVAL
public static final String REPLICATOR_OPTION_MAX_RETRY_INTERVAL
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_ENABLE_AUTO_PURGE
public static final String REPLICATOR_OPTION_ENABLE_AUTO_PURGE
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_ROOT_CERTS
public static final String REPLICATOR_OPTION_ROOT_CERTS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_PINNED_SERVER_CERT
public static final String REPLICATOR_OPTION_PINNED_SERVER_CERT
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_SELF_SIGNED_SERVER_CERT
public static final String REPLICATOR_OPTION_SELF_SIGNED_SERVER_CERT
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_EXTRA_HEADERS
public static final String REPLICATOR_OPTION_EXTRA_HEADERS
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_COOKIES
public static final String REPLICATOR_OPTION_COOKIES
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_AUTHENTICATION
public static final String REPLICATOR_OPTION_AUTHENTICATION
- See Also:
- Constant Field Values
-
REPLICATOR_OPTION_PROXY_SERVER
public static final String REPLICATOR_OPTION_PROXY_SERVER
- See Also:
- Constant Field Values
-
REPLICATOR_HEARTBEAT_INTERVAL
public static final String REPLICATOR_HEARTBEAT_INTERVAL
- See Also:
- Constant Field Values
-
SOCKET_OPTION_WS_PROTOCOLS
public static final String SOCKET_OPTION_WS_PROTOCOLS
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_TYPE
public static final String REPLICATOR_AUTH_TYPE
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_USER_NAME
public static final String REPLICATOR_AUTH_USER_NAME
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_PASSWORD
public static final String REPLICATOR_AUTH_PASSWORD
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_CLIENT_CERT
public static final String REPLICATOR_AUTH_CLIENT_CERT
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_CLIENT_CERT_KEY
public static final String REPLICATOR_AUTH_CLIENT_CERT_KEY
- See Also:
- Constant Field Values
-
REPLICATOR_AUTH_TOKEN
public static final String REPLICATOR_AUTH_TOKEN
- See Also:
- Constant Field Values
-
AUTH_TYPE_BASIC
public static final String AUTH_TYPE_BASIC
- See Also:
- Constant Field Values
-
AUTH_TYPE_SESSION
public static final String AUTH_TYPE_SESSION
- See Also:
- Constant Field Values
-
AUTH_TYPE_OPEN_ID_CONNECT
public static final String AUTH_TYPE_OPEN_ID_CONNECT
- See Also:
- Constant Field Values
-
AUTH_TYPE_FACEBOOK
public static final String AUTH_TYPE_FACEBOOK
- See Also:
- Constant Field Values
-
AUTH_TYPE_CLIENT_CERT
public static final String AUTH_TYPE_CLIENT_CERT
- See Also:
- Constant Field Values
-
PROGRESS_OVERALL
public static final int PROGRESS_OVERALL
- See Also:
- Constant Field Values
-
PROGRESS_PER_DOC
public static final int PROGRESS_PER_DOC
- See Also:
- Constant Field Values
-
PROGRESS_PER_ATTACHMENT
public static final int PROGRESS_PER_ATTACHMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start(boolean restart)
-
stop
public void stop()
-
close
@CallSuper public void close()
-
setOptions
public void setOptions(@Nullable byte[] options)
-
getStatus
@Nullable public C4ReplicatorStatus getStatus()
-
isDocumentPending
public boolean isDocumentPending(String docId) throws LiteCoreException
- Throws:
LiteCoreException
-
getPendingDocIDs
@NonNull public Set<String> getPendingDocIDs() throws LiteCoreException
- Throws:
LiteCoreException
-
setProgressLevel
public void setProgressLevel(int level) throws LiteCoreException
- Throws:
LiteCoreException
-
setHostReachable
public void setHostReachable(boolean reachable)
-
toString
@NonNull public String toString()
- Overrides:
toString
in classC4NativePeer
-
-