object CassandraFlow
- Alphabetic
- By Inheritance
- CassandraFlow
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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()
- def create[T](writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: (T, PreparedStatement) => BoundStatement)(implicit session: CassandraSession): Flow[T, T, NotUsed]
A flow writing to Cassandra for every stream element.
A flow writing to Cassandra for every stream element. The element to be persisted is emitted unchanged.
- T
stream element type
- writeSettings
settings to configure the write operation
- cqlStatement
raw CQL statement
- statementBinder
function to bind data from the stream element to the prepared statement
- session
implicit Cassandra session from
CassandraSessionRegistry
- def createBatch[T, K](writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: (T, PreparedStatement) => BoundStatement, groupingKey: (T) => K)(implicit session: CassandraSession): Flow[T, T, NotUsed]
Creates a flow that uses com.datastax.oss.driver.api.core.cql.BatchStatement and groups the elements internally into batches using the
writeSettings
and pergroupingKey
.Creates a flow that uses com.datastax.oss.driver.api.core.cql.BatchStatement and groups the elements internally into batches using the
writeSettings
and pergroupingKey
. Use this when most of the elements in the stream share the same partition key.Cassandra batches that share the same partition key will only resolve to one write internally in Cassandra, boosting write performance.
"A LOGGED batch to a single partition will be converted to an UNLOGGED batch as an optimization." (Batch CQL)
Be aware that this stage does NOT preserve the upstream order.
- T
stream element type
- K
extracted key type for grouping into batches
- writeSettings
settings to configure the batching and the write operation
- cqlStatement
raw CQL statement
- statementBinder
function to bind data from the stream element to the prepared statement
- groupingKey
groups the elements to go into the same batch
- session
implicit Cassandra session from
CassandraSessionRegistry
- 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()
- def withContext[T, Ctx](writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: (T, PreparedStatement) => BoundStatement)(implicit session: CassandraSession): FlowWithContext[T, Ctx, T, Ctx, NotUsed]
A flow writing to Cassandra for every stream element, passing context along.
A flow writing to Cassandra for every stream element, passing context along. The element (to be persisted) and the context are emitted unchanged.
- T
stream element type
- Ctx
context type
- writeSettings
settings to configure the write operation
- cqlStatement
raw CQL statement
- statementBinder
function to bind data from the stream element to the prepared statement
- session
implicit Cassandra session from
CassandraSessionRegistry