@@ -17,7 +17,11 @@ import scala.util.Try
1717trait CassandraPersistence [F [_], S ] extends PersistenceModule [F , S ]
1818object CassandraPersistence {
1919
20- /** Creates schema in Cassandra if not there yet. */
20+ /** Creates schema in Cassandra if not there yet. Uses default names for all Cassandra tables:
21+ * - for keys see [[com.evolutiongaming.kafka.flow.key.CassandraKeys.DefaultTableName ]]
22+ * - for snapshots see [[com.evolutiongaming.kafka.flow.snapshot.CassandraSnapshots.DefaultTableName ]]
23+ * - for journals see [[com.evolutiongaming.kafka.flow.journal.CassandraJournals.DefaultTableName ]]
24+ */
2125 def withSchemaF [F [_]: Async , S ](
2226 session : scassandra.CassandraSession [F ],
2327 sync : CassandraSync [F ],
@@ -33,7 +37,10 @@ object CassandraPersistence {
3337 def snapshots = _snapshots
3438 }
3539
36- /** Creates schema in Cassandra if not there yet
40+ /** Creates schema in Cassandra if not there yet. Uses default names for all Cassandra tables:
41+ * - for keys see [[com.evolutiongaming.kafka.flow.key.CassandraKeys.DefaultTableName ]]
42+ * - for snapshots see [[com.evolutiongaming.kafka.flow.snapshot.CassandraSnapshots.DefaultTableName ]]
43+ * - for journals see [[com.evolutiongaming.kafka.flow.journal.CassandraJournals.DefaultTableName ]]
3744 *
3845 * This method uses the same `JsonCodec[Try]` as `JournalParser` does to simplify defining the basic application. if
3946 * \@consistencyConfig is present then applies ConsistencyConfig.Read for all read queries and
@@ -51,12 +58,16 @@ object CassandraPersistence {
5158 withSchemaF(session, sync, consistencyOverrides, keysSegments)
5259 }
5360
54- /** Deletes all data in Cassandra */
61+ /** Deletes all data in Cassandra. Uses default names for all Cassandra tables:
62+ * - for keys see [[com.evolutiongaming.kafka.flow.key.CassandraKeys.DefaultTableName ]]
63+ * - for snapshots see [[com.evolutiongaming.kafka.flow.snapshot.CassandraSnapshots.DefaultTableName ]]
64+ * - for journals see [[com.evolutiongaming.kafka.flow.journal.CassandraJournals.DefaultTableName ]]
65+ */
5566 def truncate [F [_]: Monad ](
5667 session : scassandra.CassandraSession [F ],
5768 sync : CassandraSync [F ]
5869 ): F [Unit ] =
5970 CassandraKeys .truncate(session, sync, CassandraKeys .DefaultTableName ) *>
60- CassandraJournals .truncate(session, sync) *>
71+ CassandraJournals .truncate(session, sync, CassandraJournals . DefaultTableName ) *>
6172 CassandraSnapshots .truncate(session, sync, CassandraSnapshots .DefaultTableName )
6273}
0 commit comments