Class

akka.persistence.cassandra.session.scaladsl

CassandraSession

Related Doc: package scaladsl

Permalink

final class CassandraSession extends AnyRef

Data Access Object for Cassandra. The statements are expressed in Cassandra Query Language (CQL) syntax.

The init hook is called before the underlying session is used by other methods, so it can be used for things like creating the keyspace and tables.

All methods are non-blocking.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CassandraSession
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CassandraSession(system: ActorSystem, sessionProvider: SessionProvider, settings: CassandraSessionSettings, executionContext: ExecutionContext, log: LoggingAdapter, metricsCategory: String, init: (Session) ⇒ Future[Done])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def close(): Unit

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def executeCreateTable(stmt: String): Future[Done]

    Permalink

    See Creating a table.

    See Creating a table.

    The returned Future is completed when the table has been created, or if the statement fails.

  10. def executeWrite(stmt: String, bindValues: AnyRef*): Future[Done]

    Permalink

    Prepare, bind and execute one statement in one go.

    Prepare, bind and execute one statement in one go.

    See Inserting and updating data.

    The configured write consistency level is used.

    The returned Future is completed when the statement has been successfully executed, or if it fails.

  11. def executeWrite(stmt: Statement): Future[Done]

    Permalink

    Execute one statement.

    Execute one statement. First you must #prepare the statement and bind its parameters.

    See Inserting and updating data.

    The configured write consistency level is used if a specific consistency level has not been set on the Statement.

    The returned Future is completed when the statement has been successfully executed, or if it fails.

  12. def executeWriteBatch(batch: BatchStatement): Future[Done]

    Permalink

    Execute several statements in a batch.

    Execute several statements in a batch. First you must #prepare the statements and bind its parameters.

    See Batching data insertion and updates.

    The configured write consistency level is used if a specific consistency level has not been set on the BatchStatement.

    The returned Future is completed when the batch has been successfully executed, or if it fails.

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def prepare(stmt: String): Future[PreparedStatement]

    Permalink

    Create a PreparedStatement that can be bound and used in executeWrite or select multiple times.

  21. def protocolVersion: ProtocolVersion

    Permalink

    This can only be used after successful initialization, otherwise throws IllegalStateException.

  22. def select(stmt: String, bindValues: AnyRef*): Source[Row, NotUsed]

    Permalink

    Prepare, bind and execute a select statement in one go.

    Prepare, bind and execute a select statement in one go.

    See Querying tables.

    The configured read consistency level is used.

    Note that you have to connect a Sink that consumes the messages from this Source and then run the stream.

  23. def select(stmt: Statement): Source[Row, NotUsed]

    Permalink

    Execute a select statement.

    Execute a select statement. First you must #prepare the statement and bind its parameters.

    See Querying tables.

    The configured read consistency level is used if a specific consistency level has not been set on the Statement.

    Note that you have to connect a Sink that consumes the messages from this Source and then run the stream.

  24. def selectAll(stmt: String, bindValues: AnyRef*): Future[Seq[Row]]

    Permalink

    Prepare, bind and execute a select statement in one go.

    Prepare, bind and execute a select statement in one go. Only use this method when you know that the result is small, e.g. includes a LIMIT clause. Otherwise you should use the select method that returns a Source.

    The configured read consistency level is used.

    The returned Future is completed with the found rows.

  25. def selectAll(stmt: Statement): Future[Seq[Row]]

    Permalink

    Execute a select statement.

    Execute a select statement. First you must #prepare the statement and bind its parameters. Only use this method when you know that the result is small, e.g. includes a LIMIT clause. Otherwise you should use the select method that returns a Source.

    The configured read consistency level is used if a specific consistency level has not been set on the Statement.

    The returned Future is completed with the found rows.

  26. def selectOne(stmt: String, bindValues: AnyRef*): Future[Option[Row]]

    Permalink

    Prepare, bind and execute a select statement that returns one row.

    Prepare, bind and execute a select statement that returns one row.

    The configured read consistency level is used.

    The returned Future is completed with the first row, if any.

  27. def selectOne(stmt: Statement): Future[Option[Row]]

    Permalink

    Execute a select statement that returns one row.

    Execute a select statement that returns one row. First you must #prepare the statement and bind its parameters.

    The configured read consistency level is used if a specific consistency level has not been set on the Statement.

    The returned Future is completed with the first row, if any.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def underlying(): Future[Session]

    Permalink

    The Session of the underlying Datastax Java Driver.

    The Session of the underlying Datastax Java Driver. Can be used in case you need to do something that is not provided by the API exposed by this class. Be careful to not use blocking calls.

  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped