Interface KeyspacePopulator
- All Known Implementing Classes:
CompositeKeyspacePopulator
,ResourceKeyspacePopulator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy used to populate, initialize, or clean up a Cassandra keyspace.
- Since:
- 3.0
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
populate
(com.datastax.oss.driver.api.core.CqlSession session) Populate, initialize, or clean up the database using the provided CqlSession connection.
-
Method Details
-
populate
Populate, initialize, or clean up the database using the provided CqlSession connection.Concrete implementations may throw a
RuntimeException
if an error is encountered but are strongly encouraged to throw a specificScriptException
instead. For example, Spring'sResourceKeyspacePopulator
wrap all exceptions inScriptExceptions
.- Parameters:
session
- the CQLCqlSession
to use to populate the keyspace; already configured and ready to use; never null- Throws:
ScriptException
- in all other error cases
-