akka.stream.alpakka.couchbase.scaladsl
CouchbaseCollectionSession
Companion object CouchbaseCollectionSession
trait CouchbaseCollectionSession extends AnyRef
- Annotations
- @DoNotInherit()
- Source
- CouchbaseCollectionSession.scala
- Alphabetic
- By Inheritance
- CouchbaseCollectionSession
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def asJava: javadsl.CouchbaseCollectionSession
- abstract def bucket: CouchbaseSession
- abstract def createIndex(indexName: String, createQueryIndexOptions: CreateQueryIndexOptions, fields: String*): Future[Done]
Create a secondary index for the current collection.
Create a secondary index for the current collection.
- indexName
the name of the index.
- createQueryIndexOptions
Couchbase index options
- fields
the JSON fields to index
- returns
a scala.concurrent.Future of
trueif the index was/will be effectively created,falseif the index existed andignoreIfExististrue. Completion of the future does not guarantee the index is online and ready to be used.
- abstract def get[T](id: String)(implicit ct: ClassTag[T]): Future[CouchbaseDocument[T]]
Reads a document into an object of target class using appropriate Transcoders: * If T === Array[Byte] then RawBinaryTranscoder is used * If T === String then RawStringTranscoder is used * The default json to class transcoder is used otherwise
Reads a document into an object of target class using appropriate Transcoders: * If T === Array[Byte] then RawBinaryTranscoder is used * If T === String then RawStringTranscoder is used * The default json to class transcoder is used otherwise
- T
type of the object to return
- id
id of the document
- returns
a future that completes with created object or errors if the operation failed
- abstract def getBytes(id: String, timeout: FiniteDuration): Future[CouchbaseDocument[Array[Byte]]]
Reads a document into an array of bytes with given timeout
Reads a document into an array of bytes with given timeout
- id
Identifier of the document to fetch
- timeout
fail the returned future with a TimeoutException if it takes longer than this
- returns
a future that completes with Raw data for the document or errors if the operation failed
- abstract def getBytes(id: String): Future[CouchbaseDocument[Array[Byte]]]
Reads a document into an array of bytes
Reads a document into an array of bytes
- id
Identifier of the document to fetch
- returns
a future that completes with Raw data for the document or errors if the operation failed
- abstract def getDocument(id: String, timeout: FiniteDuration): Future[CouchbaseDocument[JsonValue]]
Reads a document as JsonValue with given timeout
Reads a document as JsonValue with given timeout
- id
Identifier of the document to fetch
- timeout
fail the returned future with a TimeoutException if it takes longer than this
- returns
a future that completes with the requested document or errors if the operation failed
- abstract def getDocument(id: String): Future[CouchbaseDocument[JsonValue]]
Reads a json document as JsonValue (either array or object)
Reads a json document as JsonValue (either array or object)
- id
id of the document
- returns
a future that completes with the requested document or errors if the operation failed
- abstract def insert[T](id: String, document: T, insertOptions: InsertOptions): Future[Done]
Insert a document using provided InsertOptions.
Insert a document using provided InsertOptions.
- T
type of the document
- id
id of the document
- document
value of the document
- insertOptions
Couchbase InsertOptions
- returns
a future that completes when the document was written or errors if the operation failed
- abstract def insert[T](id: String, document: T): Future[Done]
Insert a document using default InsertOptions and automatically detected Transcoder.
Insert a document using default InsertOptions and automatically detected Transcoder. Will use RawBinaryTranscoder if document._2 is an array of bytes, RawStringTranscoder if its a String and the default Transcoder otherwise.
- T
type of the document
- id
id of the document
- document
value of the document
- returns
a future that completes when the document was written
- abstract def listIndexes(): Source[QueryIndex, NotUsed]
List the existing secondary indexes for the collection
- abstract def remove(id: String, removeOptions: RemoveOptions, timeout: FiniteDuration): Future[Done]
Removes document with given id, remove options and timeout
Removes document with given id, remove options and timeout
- id
id of the document to remove
- removeOptions
Couchbase remove options
- timeout
timeout
- returns
the id
- abstract def remove(id: String, removeOptions: RemoveOptions): Future[Done]
Remove a document by id using the default write settings.
Remove a document by id using the default write settings.
- returns
Future that completes when the document has been removed, if there is no such document the future is failed with a
DocumentDoesNotExistException
- abstract def remove(id: String): Future[Done]
Remove a document by id using the default write settings.
Remove a document by id using the default write settings.
- returns
Future that completes when the document has been removed, if there is no such document the future is failed with a
DocumentDoesNotExistException
- abstract def replace[T](id: String, document: T, replaceOptions: ReplaceOptions, timeout: FiniteDuration): Future[Done]
Replace using write settings and timeout
Replace using write settings and timeout
- id
id of the document
- document
document value to replace
- replaceOptions
Couchbase replace options
- timeout
timeout for the operation
- returns
a future that completes after operation is done
- abstract def replace[T](id: String, document: T, replaceOptions: ReplaceOptions): Future[Done]
Replace using the given replace options
Replace using the given replace options
For replacing other types of documents see
replaceDoc.- returns
a future that completes when the replace is done
- abstract def replace[T](id: String, document: T): Future[Done]
Replace a document using the default write settings.
Replace a document using the default write settings.
For replacing other types of documents see
replaceDoc.- returns
a future that completes when the replace is done
- abstract def scope: AsyncScope
- abstract def underlying: AsyncCollection
- abstract def upsert[T](id: String, document: T, upsertOptions: UpsertOptions, timeout: FiniteDuration): Future[Done]
Upsert a document using given write settings and timeout
Upsert a document using given write settings and timeout
- id
document id
- document
document value to upsert
- upsertOptions
Couchbase UpsertOptions
- timeout
timeout for the operation
- returns
a future that completes after operation is done
- abstract def upsert[T](id: String, document: T, upsertOptions: UpsertOptions): Future[Done]
Upsert a document using provided write settings.
Upsert a document using provided write settings.
- T
type of the document
- id
document id
- document
value of the document
- upsertOptions
Couchbase UpsertOptions
- returns
a future that completes when the upsert is done
- abstract def upsert[T](id: String, document: T): Future[Done]
Upsert a document using the default write settings.
Upsert a document using the default write settings.
- T
type of the document
- id
document id
- document
value of the document
- returns
a future that completes when the upsert is done
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getJsonArray(id: String): Future[CouchbaseDocument[JsonArray]]
Reads a document with given id as JsonArray
Reads a document with given id as JsonArray
- id
id of the document
- returns
a future that completes with the requested document or errors if the operation failed
- def getJsonObject(id: String): Future[CouchbaseDocument[JsonObject]]
Reads a document with given id as JsonObject
Reads a document with given id as JsonObject
- id
id of the document
- returns
a future that completes with the requested document or errors if the operation failed
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()