package config
contains the LongevityConfig plus supporting types and classes
- Source
- package.scala
- Alphabetic
- By Inheritance
- config
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed
trait
BackEnd extends AnyRef
the back end used by the longevity context.
-
case class
CassandraConfig(autoCreateKeyspace: Boolean, keyspace: String, address: String, credentials: Option[DatabaseCredentials], replicationFactor: Int) extends Product with Serializable
the Cassandra configuration
the Cassandra configuration
- autoCreateKeyspace
should longevity automatically create the keyspace if it doesn't already exist when the connection is opened?
- keyspace
the cassandra keyspace
- address
the contact point for the cassandra cluster
- credentials
optional username and password for connecting to the cassandra cluster
- replicationFactor
the replication factor to use when creating a keyspace
- See also
LongevityConfig
-
case class
DatabaseCredentials(username: String, password: String) extends Product with Serializable
cassandra database credentials
cassandra database credentials
- See also
CassandraConfig
-
case class
JdbcConfig(driverClass: String, url: String) extends Product with Serializable
the JDBC configuration
the JDBC configuration
- driverClass
the name of the driver class. this should always be "org.sqlite.JDBC", but we are leaving a back door here for people who want to experiment with this back end using a different JDBC driver
- url
the database url
- See also
LongevityConfig
-
case class
LongevityConfig(backEnd: BackEnd, modelVersion: Option[String], autoOpenConnection: Boolean, autoCreateSchema: Boolean, optimisticLocking: Boolean, writeTimestamps: Boolean, cassandra: CassandraConfig, mongodb: MongoDBConfig, jdbc: JdbcConfig, test: TestConfig) extends PersistenceConfig with Product with Serializable
the longevity configuration.
the longevity configuration. see the
reference.conf
resource file for all the longevity config settings, and their defaults.- backEnd
the back end used by the longevity context
- modelVersion
the domain model version.
None
whenever the model is unversioned- autoOpenConnection
should longevity automatically open the connection when the repositories are created?
- autoCreateSchema
should longevity autocreate schema when the connection is opened?
- optimisticLocking
is optimistic locking turned on?
- cassandra
the cassandra configuration
- mongodb
the mongo configuration
- jdbc
the JDBC configuration. used by the SQLite back end
- test
the test configuration
-
case class
MongoDBConfig(uri: String, db: String) extends Product with Serializable
the MongoDB configuration
the MongoDB configuration
- uri
the MongoDB URI
- db
the name of the MongoDB database to use
- See also
LongevityConfig
-
case class
TestConfig(cassandra: CassandraConfig, mongodb: MongoDBConfig, jdbc: JdbcConfig) extends Product with Serializable
the test configuration
the test configuration
- cassandra
the test configuration for Cassandra
- mongodb
the test configuration for MongoDB
- jdbc
the JDBC configuration. used by the SQLite back end
- See also
LongevityConfig
Value Members
-
object
Cassandra extends BackEnd with Product with Serializable
a back end indicating that persistent objects live in Cassandra
-
object
InMem extends BackEnd with Product with Serializable
a back end indicating that persistent objects live in-memory.
a back end indicating that persistent objects live in-memory. when the application exits, they are gone.
the current implementation is not designed to perform well in the face of large datasets. it is a fully functional back end that can be used in testing, when you don't want to deal with the hassle of connecting to a real database, and cleaning up after your tests.
-
object
JDBC extends BackEnd with Product with Serializable
a back end indicating that persistent objects live in some unspecified database that we connect to via some unspecified JDBC driver
-
object
LongevityConfig extends Serializable
contains a factory method for LongevityConfig
-
object
MongoDB extends BackEnd with Product with Serializable
a back end indicating that persistent objects live in MongoDB
-
object
SQLite extends BackEnd with Product with Serializable
a back end indicating that persistent objects live in SQLite