org.apache.pekko.stream.connectors.couchbase.javadsl
CouchbaseSession
Companion object CouchbaseSession
abstract class CouchbaseSession extends AnyRef
Java API: A Couchbase session allowing querying and interacting with a specific couchbase bucket.
Not for user extension.
- Annotations
- @DoNotInherit()
- Source
- CouchbaseSession.scala
- Alphabetic
- By Inheritance
- CouchbaseSession
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CouchbaseSession()
Abstract Value Members
- abstract def asScala: scaladsl.CouchbaseSession
- abstract def close(): CompletionStage[Done]
Close the session and release all resources it holds.
Close the session and release all resources it holds. Subsequent calls to other methods will likely fail.
- abstract def counter(id: String, delta: Long, initial: Long, writeSettings: CouchbaseWriteSettings): CompletionStage[Long]
Create or increment a counter
Create or increment a counter
- id
What counter document id
- delta
Value to increase the counter with if it does exist
- initial
Value to start from if the counter does not exist
- returns
The value of the counter after applying the delta
- abstract def counter(id: String, delta: Long, initial: Long): CompletionStage[Long]
Create or increment a counter
Create or increment a counter
- id
What counter document id
- delta
Value to increase the counter with if it does exist
- initial
Value to start from if the counter does not exist
- returns
The value of the counter after applying the delta
- abstract def createIndex(indexName: String, ignoreIfExist: Boolean, fields: AnyRef*): CompletionStage[Boolean]
Create a secondary index for the current bucket.
Create a secondary index for the current bucket.
- indexName
the name of the index.
- ignoreIfExist
if a secondary index already exists with that name, an exception will be thrown unless this is set to true.
- fields
the JSON fields to index - each can be either
String
or com.couchbase.client.java.query.dsl.Expression- returns
a java.util.concurrent.CompletionStage of
true
if the index was/will be effectively created,false
if the index existed and ignoreIfExistis true. Completion of the
CompletionStagedoes not guarantee the index is online and ready to be used.
- abstract def get[T <: Document[_]](id: String, timeout: Duration, documentClass: Class[T]): CompletionStage[Optional[T]]
- timeout
fail the returned CompletionStage 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 get(id: String, timeout: Duration): CompletionStage[Optional[JsonDocument]]
- timeout
fail the returned CompletionStage 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 get[T <: Document[_]](id: String, documentClass: Class[T]): CompletionStage[Optional[T]]
- returns
A document if found or none if there is no document for the id
- abstract def get(id: String): CompletionStage[Optional[JsonDocument]]
- returns
A document if found or none if there is no document for the id
- abstract def insert(document: JsonDocument, writeSettings: CouchbaseWriteSettings): CompletionStage[JsonDocument]
Insert a JSON document using the given write settings.
Insert a JSON document using the given write settings.
For inserting other types of documents see
insertDoc
. - abstract def insert(document: JsonDocument): CompletionStage[JsonDocument]
Insert a JSON document using the default write settings.
Insert a JSON document using the default write settings.
For inserting other types of documents see
insertDoc
.- returns
A CompletionStage that completes with the written document when the write completes
- abstract def insertDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): CompletionStage[T]
Insert a document using the given write settings.
Insert a document using the given write settings. Separate from
insert
to make the most common case smoother with the type inference - abstract def insertDoc[T <: Document[_]](document: T): CompletionStage[T]
Insert a document using the default write settings.
Insert a document using the default write settings. Separate from
insert
to make the most common case smoother with the type inference- returns
A CompletionStage that completes with the written document when the write completes
- abstract def listIndexes(): Source[IndexInfo, NotUsed]
List the existing secondary indexes for the bucket
- abstract def remove(id: String, writeSettings: CouchbaseWriteSettings): CompletionStage[Done]
Remove a document by id using the default write settings.
Remove a document by id using the default write settings.
- returns
CompletionStage that completes when the document has been removed, if there is no such document the CompletionStage 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
CompletionStage that completes when the document has been removed, if there is no such document the CompletionStage is failed with a
DocumentDoesNotExistException
- abstract def replace(document: JsonDocument, writeSettings: CouchbaseWriteSettings): CompletionStage[JsonDocument]
Replace using the given write settings.
Replace using the given write settings.
For replacing other types of documents see
replaceDoc
.- returns
a CompletionStage that completes when the replace done
- abstract def replace(document: JsonDocument): CompletionStage[JsonDocument]
Replace using the default write settings
Replace using the default write settings
For replacing other types of documents see
replaceDoc
.- returns
a CompletionStage that completes when the replace is done
- abstract def replaceDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): CompletionStage[T]
Replace using the given write settings.
Replace using the given write settings.
Separate from
replace
to make the most common case smoother with the type inference- returns
a CompletionStage that completes when the replace is done
- abstract def replaceDoc[T <: Document[_]](document: T): CompletionStage[T]
Replace using the default write settings.
Replace using the default write settings. Separate from
replace
to make the most common case smoother with the type inference- returns
a CompletionStage that completes when the replace is done
- abstract def singleResponseQuery(query: N1qlQuery): CompletionStage[Optional[JsonObject]]
- abstract def singleResponseQuery(query: Statement): CompletionStage[Optional[JsonObject]]
- abstract def streamedQuery(query: Statement): Source[JsonObject, NotUsed]
- abstract def streamedQuery(query: N1qlQuery): Source[JsonObject, NotUsed]
- abstract def underlying: AsyncBucket
- abstract def upsert(document: JsonDocument, writeSettings: CouchbaseWriteSettings): CompletionStage[JsonDocument]
Upsert using the given write settings.
Upsert using the given write settings.
For inserting other types of documents see
upsertDoc
.- returns
a CompletionStage that completes when the upsert is done
- abstract def upsert(document: JsonDocument): CompletionStage[JsonDocument]
Upsert using the default write settings
Upsert using the default write settings
For inserting other types of documents see
upsertDoc
.- returns
a CompletionStage that completes when the upsert is done
- abstract def upsertDoc[T <: Document[_]](document: T, writeSettings: CouchbaseWriteSettings): CompletionStage[T]
Upsert using the given write settings.
Upsert using the given write settings.
Separate from
upsert
to make the most common case smoother with the type inference- returns
a CompletionStage that completes when the upsert is done
- abstract def upsertDoc[T <: Document[_]](document: T): CompletionStage[T]
Upsert using the default write settings.
Upsert using the default write settings. Separate from
upsert
to make the most common case smoother with the type inference- returns
a CompletionStage 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
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- 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()