Class CollectionConfiguration

java.lang.Object
com.couchbase.lite.CollectionConfiguration

public class CollectionConfiguration extends Object
  • Constructor Details

  • Method Details

    • setDocumentIDs

      @NonNull public final CollectionConfiguration setDocumentIDs(@Nullable List<String> documentIDs)
      Sets a collection of document IDs to filter by: if given, only documents with these IDs will be pushed and/or pulled.
      Parameters:
      documentIDs - The document IDs.
      Returns:
      this.
    • setChannels

      @NonNull public final CollectionConfiguration setChannels(@Nullable List<String> channels)
      Sets a collection of Sync Gateway channel names from which to pull Documents. If unset, all accessible channels will be pulled. Default is empty: pull from all accessible channels. Note: Channel specifications apply only to replications pulling from a SyncGateway and only the channels visible to the authenticated user. Channel specs are ignored:
      • during a push replication.
      • during peer-to-peer or database-to-database replication
      • when the specified channel is not accessible to the user
      Parameters:
      channels - The Sync Gateway channel names.
      Returns:
      this.
    • setConflictResolver

      @NonNull public final CollectionConfiguration setConflictResolver(@Nullable ConflictResolver conflictResolver)
      Sets the conflict resolver.
      Parameters:
      conflictResolver - A conflict resolver.
      Returns:
      this.
    • setPullFilter

      @NonNull public final CollectionConfiguration setPullFilter(@Nullable ReplicationFilter pullFilter)
      Sets a filter object for validating whether the documents can be pulled from the remote endpoint. Only documents for which the object returns true are replicated.
      Parameters:
      pullFilter - The filter to filter the document to be pulled.
      Returns:
      this.
    • setPushFilter

      @NonNull public final CollectionConfiguration setPushFilter(@Nullable ReplicationFilter pushFilter)
      Sets a filter object for validating whether the documents can be pushed to the remote endpoint.
      Parameters:
      pushFilter - The filter to filter the document to be pushed.
      Returns:
      this.
    • getChannels

      @Nullable public final List<String> getChannels()
      Sets a collection of Sync Gateway channel names from which to pull Documents. If unset, all accessible channels will be pulled. Default is empty: pull from all accessible channels. Note: Channel specifications apply only to replications pulling from a SyncGateway and only the channels visible to the authenticated user. Channel specs are ignored:
      • during a push replication.
      • during peer-to-peer or database-to-database replication
      • when the specified channel is not accessible to the user
    • getDocumentIDs

      @Nullable public final List<String> getDocumentIDs()
      A collection of document IDs to filter: if not nil, only documents with these IDs will be pushed and/or pulled.
    • getConflictResolver

      @Nullable public ConflictResolver getConflictResolver()
      Return the conflict resolver.
    • getPullFilter

      @Nullable public ReplicationFilter getPullFilter()
      Gets the filter used to determine whether a document will be pulled from the remote endpoint.
    • getPushFilter

      @Nullable public ReplicationFilter getPushFilter()
      Gets the filter used to determine whether a document will be pushed to the remote endpoint.
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object