Interface StatementFactory.KeyspaceProvider
- Enclosing class:
StatementFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface to determine a
keyspace for a given CassandraPersistentEntity and
tableName. Classes implementing this interface can choose to return a keyspace or null to use the
default keyspace.- Since:
- 4.4
- Author:
- Mark Paluch, John Blum, Sam Lightfoot
-
Method Summary
Modifier and TypeMethodDescriptionentity()Use the keyspace that is associated with theentity.@Nullable com.datastax.oss.driver.api.core.CqlIdentifiergetKeyspace(CassandraPersistentEntity<?> entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName) session()Use the currentsession keyspace.
-
Method Details
-
session
-
entity
Use the keyspace that is associated with theentity.- Since:
- 5.0
-
getKeyspace
@Nullable com.datastax.oss.driver.api.core.CqlIdentifier getKeyspace(CassandraPersistentEntity<?> entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName) - Parameters:
entity- the persistent entity for which the operation is applied.tableName- the table of the operation.- Returns:
- a
keyspaceto use a dedicated keyspace for aStatementornullto use the default session keyspace.
-