gnieh.sohva.control

Replicator

Related Doc: package control

class Replicator extends Database with sohva.Replicator[Try]

A replicator database that allows people to manage replications:

Linear Supertypes
sohva.Replicator[Try], Database, sohva.Database[Try], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Replicator
  2. Replicator
  3. Database
  4. Database
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Replicator(couch: CouchDB, wrapped: async.Replicator)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def _all_docs(key: Option[String] = None, keys: List[String] = Nil, startkey: Option[String] = None, startkey_docid: Option[String] = None, endkey: Option[String] = None, endkey_docid: Option[String] = None, limit: Int = 1, stale: Option[String] = None, descending: Boolean = false, skip: Int = 0, inclusive_end: Boolean = true): Try[List[String]]

    Returns the list of identifiers of the documents in this database

    Returns the list of identifiers of the documents in this database

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def attachTo(docId: String, attachment: String, stream: InputStream, contentType: String): Try[Boolean]

    Attaches the given file (given as an input stream) to the given document id.

    Attaches the given file (given as an input stream) to the given document id. If no mime type is given, sohva tries to guess the mime type of the file itself. It it does not manage to identify the mime type, the file won't be attached... This method returns true iff the file was attached to the document.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  7. def attachTo(docId: String, file: File, contentType: String): Try[Boolean]

    Attaches the given file to the given document id.

    Attaches the given file to the given document id. This method returns true iff the file was attached to the document.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  8. def builtInView(view: String): View

    Returns a built-in view of this database, identified by its name.

    Returns a built-in view of this database, identified by its name. E.g. _all_docs.

    Definition Classes
    DatabaseDatabase
  9. def changes(since: Option[Int] = None, filter: Option[String] = None): ChangeStream

    Registers to the change stream of this database with potential filter and since some revision.

    Registers to the change stream of this database with potential filter and since some revision. If no revision is given changes that occurred before the connection was established are not sent

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def copy(origin: String, target: String, originRev: Option[String] = None, targetRev: Option[String] = None): Try[Boolean]

    Copies the origin document to the target document.

    Copies the origin document to the target document. If the target does not exist, it is created, otherwise it is updated and the target revision must be provided

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  12. val couch: CouchDB

    The couchdb instance this database belongs to

    The couchdb instance this database belongs to

    Definition Classes
    DatabaseDatabase
  13. def create: Try[Boolean]

    Creates this database in the couchdb instance if it does not already exist.

    Creates this database in the couchdb instance if it does not already exist. Returns true iff the database was actually created.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  14. def createDoc(doc: Any): Try[DbResult]

    Creates a document in the database and returns its identifier and revision.

    Creates a document in the database and returns its identifier and revision. If the json version of the object has a _id field, this identifier is used for the document, otherwise a new one is generated.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  15. def createDocs(docs: List[Any]): Try[List[DbResult]]

    Creates a set of documents in the database and returns theirs identifiers and revision.

    Creates a set of documents in the database and returns theirs identifiers and revision. If the json version of an object has a _id field, this identifier is used for the document, otherwise a new one is generated.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  16. val credit: Int

    The retry credit

    The retry credit

    Definition Classes
    DatabaseDatabase
  17. def delete: Try[Boolean]

    Deletes this database in the couchdb instance if it exists.

    Deletes this database in the couchdb instance if it exists. Returns true iff the database was actually deleted.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  18. def deleteAttachment(docId: String, attachment: String): Try[Boolean]

    Deletes the given attachment for the given docId

    Deletes the given attachment for the given docId

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  19. def deleteDoc(id: String): Try[Boolean]

    Deletes the document identified by the given id from the database.

    Deletes the document identified by the given id from the database. If the document exists it is deleted and the method returns true, otherwise returns false.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  20. def deleteDoc[T](doc: T)(implicit arg0: (T) ⇒ IdRev): Try[Boolean]

    Deletes the document from the database.

    Deletes the document from the database. The document will only be deleted if the caller provided the last revision

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  21. def deleteDocs(ids: List[String], all_or_nothing: Boolean = false): Try[List[DbResult]]

    Deletes a bunch of documents at once returning the results for each identifier in the document list.

    Deletes a bunch of documents at once returning the results for each identifier in the document list. One can choose the update strategy by setting the parameter all_or_nothing to true or false.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  22. def design(designName: String, language: String = "javascript"): Design

    Returns a design object that allows user to work with views

    Returns a design object that allows user to work with views

    Definition Classes
    DatabaseDatabase
  23. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  25. def exists: Try[Boolean]

    Indicates whether this database exists

    Indicates whether this database exists

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def getAttachment(docId: String, attachment: String): Try[Option[(String, InputStream)]]

    Returns the given attachment for the given docId.

    Returns the given attachment for the given docId. It returns the mime type if any given in the response and the input stream to read the response from the server.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def getDocById[T](id: String, revision: Option[String] = None)(implicit arg0: Manifest[T]): Try[Option[T]]

    Returns the document identified by the given id if it exists

    Returns the document identified by the given id if it exists

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  30. def getDocRevision(id: String): Try[Option[String]]

    Returns the current revision of the document if it exists

    Returns the current revision of the document if it exists

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  31. def getDocRevisions(ids: List[String]): Try[List[(String, String)]]

    Returns the current revision of the documents

    Returns the current revision of the documents

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  32. def getDocsById[T](ids: List[String])(implicit arg0: Manifest[T]): Try[List[T]]

    Returns all the documents with given identifiers and of the given type.

    Returns all the documents with given identifiers and of the given type. If the document with an identifier exists in the database but has not the required type, it is not added to the result

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  33. def getRawDocById(id: String, revision: Option[String] = None): Try[Option[JValue]]

    Returns the raw repsentation of the document identified by the given id if it exists

    Returns the raw repsentation of the document identified by the given id if it exists

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  34. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  35. def info: Try[Option[InfoResult]]

    Returns the information about this database

    Returns the information about this database

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. val name: String

    The database name

    The database name

    Definition Classes
    DatabaseDatabase
  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. def patchDoc[T <: IdRev](id: String, rev: String, patch: JsonPatch)(implicit arg0: Manifest[T]): Try[T]

    Patches the document identified by the given identifier in the given revision.

    Patches the document identified by the given identifier in the given revision. This will work if the revision is the last one, or if it is not but the automatic conflict manager manages to solve the potential conflicts. The patched revision is returned. If something went wrong, an exception is raised

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  42. def saveDoc[T](doc: T)(implicit arg0: (T) ⇒ IdRev, arg1: Manifest[T]): Try[T]

    Creates or updates the given object as a document into this database The given object must have an _id and an optional _rev fields to conform to the couchdb document structure.

    Creates or updates the given object as a document into this database The given object must have an _id and an optional _rev fields to conform to the couchdb document structure. The saved revision is returned. If something went wrong, an exception is raised

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  43. def saveDocs[T](docs: List[T], all_or_nothing: Boolean = false)(implicit arg0: (T) ⇒ IdRev): Try[List[DbResult]]

    Creates or updates a bunch of documents into the database.

    Creates or updates a bunch of documents into the database.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  44. def saveSecurityDoc(doc: SecurityDoc): Try[Boolean]

    Creates or updates the security document.

    Creates or updates the security document. Security documents are special documents with no _id nor _rev fields.

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  45. def securityDoc: Try[SecurityDoc]

    Returns the security document of this database if any defined

    Returns the security document of this database if any defined

    Definition Classes
    DatabaseDatabase
    Annotations
    @inline()
  46. val serializer: JsonSerializer

    The serializer used by this database

    The serializer used by this database

    Definition Classes
    DatabaseDatabase
  47. def start(replication: Replication): Try[Replication]

    Starts a new replication from source to target.

    Starts a new replication from source to target. if a replication task already exists for the same source and target, the document is added but the replication is not started again. The result only contains the identifier of the actual replication task, not its state.

    Definition Classes
    ReplicatorReplicator
  48. def stop(id: String): Try[Boolean]

    Stops the replication identified by the given replication document id.

    Stops the replication identified by the given replication document id. if the identifier does not describe the document that started the replication, it is deleted from the replicator database, but the replication task is not stopped. It returns true only if the replication was actually stopped, false otherwise.

    Definition Classes
    ReplicatorReplicator
  49. val strategy: Strategy

    The merge strategy

    The merge strategy

    Definition Classes
    DatabaseDatabase
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def temporaryView(viewDoc: ViewDoc): View

    Returns a temporary view of this database, specified by the ViewDoc.

    Returns a temporary view of this database, specified by the ViewDoc.

    Definition Classes
    DatabaseDatabase
  52. def toString(): String

    Definition Classes
    Database → AnyRef → Any
  53. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. val wrapped: async.Replicator

    Definition Classes
    ReplicatorDatabase

Inherited from sohva.Replicator[Try]

Inherited from Database

Inherited from sohva.Database[Try]

Inherited from AnyRef

Inherited from Any

Ungrouped