Packages

object CassandraFlow

Scala API to create Cassandra flows.

Source
CassandraFlow.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CassandraFlow
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. 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

  7. 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 per groupingKey.

    Creates a flow that uses com.datastax.oss.driver.api.core.cql.BatchStatement and groups the elements internally into batches using the writeSettings and per groupingKey. 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

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. 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

Inherited from AnyRef

Inherited from Any

Ungrouped