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.
Function 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
-
Method Summary
Modifier and TypeMethodDescriptioncom.datastax.oss.driver.api.core.CqlIdentifier
getKeyspace
(CassandraPersistentEntity<?> entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName)
-
Method Details
-
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
keyspace
to use a dedicated keyspace for aStatement
ornull
to use the default session keyspace.
-