akka.stream.alpakka.couchbase.javadsl
CouchbaseCollectionSession
Companion object CouchbaseCollectionSession
abstract class CouchbaseCollectionSession extends AnyRef
Java API: A Couchbase session allowing querying and interacting with a specific couchbase bucket.
Not for user extension.
- Annotations
- @DoNotInherit()
- Source
- CouchbaseCollectionSession.scala
- Alphabetic
- By Inheritance
- CouchbaseCollectionSession
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CouchbaseCollectionSession()
Abstract Value Members
- abstract def asScala: scaladsl.CouchbaseCollectionSession
- abstract def bucket: CouchbaseSession
- abstract def createIndex(indexName: String, createQueryIndexOptions: CreateQueryIndexOptions, fields: String*): CompletionStage[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 CompletionStage 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, target: Class[T]): CompletionStage[CouchbaseDocument[T]]
- abstract def getBytes(id: String, timeout: Duration): CompletionStage[CouchbaseDocument[Array[Byte]]]
- returns
A raw document data if found or none if there is no document for the id
- abstract def getBytes(id: String): CompletionStage[CouchbaseDocument[Array[Byte]]]
- id
Identifier of the document to fetch
- returns
Raw data for the document or none
- abstract def getDocument(id: String, timeout: Duration): CompletionStage[CouchbaseDocument[JsonValue]]
- timeout
fail the returned future with a TimeoutException if it takes longer than this
- returns
A document if found or none if there is no document for the id
- abstract def getDocument(id: String): CompletionStage[CouchbaseDocument[JsonValue]]
- returns
A document if found or none if there is no document for the id
- abstract def getJsonArray(id: String): CompletionStage[CouchbaseDocument[JsonArray]]
- abstract def getJsonObject(id: String): CompletionStage[CouchbaseDocument[JsonObject]]
- abstract def insert[T](id: String, document: T, insertOptions: InsertOptions): CompletionStage[Done]
- abstract def insert[T](id: String, document: T): CompletionStage[Done]
Insert a JSON document using the default write settings
Insert a JSON document using the default write settings
- document
A tuple where first element is id of the document and second is its value
- returns
A Future that completes with the id of the written document when the write is done
- abstract def listIndexes(): Source[QueryIndex, NotUsed]
List the existing secondary indexes for the collection
- abstract def remove(id: String, removeOptions: RemoveOptions, timeout: Duration): CompletionStage[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): CompletionStage[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): CompletionStage[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: Duration): CompletionStage[Done]
Replace using write settings and timeout
Replace using write settings and timeout
- id
document id
- document
document value to replace
- replaceOptions
Couchbase replace options
- timeout
timeout for the operation
- returns
the document id and value
- abstract def replace[T](id: String, document: T, replaceOptions: ReplaceOptions): CompletionStage[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): CompletionStage[Done]
Replace using the default write settings.
Replace 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: Duration): CompletionStage[Done]
Upsert using given write settings and timeout
Upsert using given write settings and timeout
- id
document id
- document
document value to upsert
- upsertOptions
Couchbase UpsertOptions
- timeout
timeout for the operation
- returns
the document id and value
- abstract def upsert[T](id: String, document: T, upsertOptions: UpsertOptions): CompletionStage[Done]
Upsert using the given write settings
Upsert using the given write settings
Separate from
upsertto make the most common case smoother with the type inference- returns
a future that completes when the upsert is done
- abstract def upsert[T](id: String, document: T): CompletionStage[Done]
Upsert using the default write settings.
Upsert using the default write settings.
- 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 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()