object CassandraFlow
- Alphabetic
- By Inheritance
- CassandraFlow
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
create[T](session: CassandraSession, writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: Function2[T, PreparedStatement, BoundStatement]): 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
- session
Cassandra session from
CassandraSessionRegistry
- writeSettings
settings to configure the write operation
- cqlStatement
raw CQL statement
- statementBinder
function to bind data from the stream element to the prepared statement
-
def
createUnloggedBatch[T, K](session: CassandraSession, writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: (T, PreparedStatement) ⇒ BoundStatement, groupingKey: Function[T, K]): 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
- session
implicit Cassandra session from
CassandraSessionRegistry
- 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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withContext[T, Ctx](session: CassandraSession, writeSettings: CassandraWriteSettings, cqlStatement: String, statementBinder: Function2[T, PreparedStatement, BoundStatement]): 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
- session
Cassandra session from
CassandraSessionRegistry
- writeSettings
settings to configure the write operation
- cqlStatement
raw CQL statement
- statementBinder
function to bind data from the stream element to the prepared statement