public interface Database extends DatabaseProxy<String,byte[]>, net.kuujo.copycat.resource.Resource<Database>
| Modifier and Type | Method and Description |
|---|---|
static Database |
create(String name)
Creates a new database with the default cluster configuration.
|
static Database |
create(String name,
net.kuujo.copycat.cluster.ClusterConfig cluster)
Creates a new database.
|
static Database |
create(String name,
net.kuujo.copycat.cluster.ClusterConfig cluster,
DatabaseConfig config)
Creates a new database.
|
clear, commit, containsKey, containsValue, counterAddAndGet, counterGet, counterGetAndAdd, counters, entrySet, get, isEmpty, keySet, prepare, prepareAndCommit, put, putAndGet, putIfAbsent, putIfAbsentAndGet, remove, remove, remove, replace, replace, replaceAndGet, rollback, size, tableNames, valuesstatic Database create(String name)
The database will be constructed with the default cluster configuration. The default cluster configuration
searches for two resources on the classpath - cluster and {cluster-defaults} - in that order. Configuration
options specified in cluster.conf will override those in {cluster-defaults.conf}.
Additionally, the database will be constructed with an database configuration that searches the classpath for
three configuration files - {name}, database, database-defaults, resource, and
resource-defaults - in that order. The first resource is a configuration resource with the same name
as the map resource. If the resource is namespaced - e.g. `databases.my-database.conf` - then resource
configurations will be loaded according to namespaces as well; for example, `databases.conf`.
name - The database name.static Database create(String name, net.kuujo.copycat.cluster.ClusterConfig cluster)
The database will be constructed with an database configuration that searches the classpath for
three configuration files - {name}, database, database-defaults, resource, and
resource-defaults - in that order. The first resource is a configuration resource with the same name
as the database resource. If the resource is namespaced - e.g. `databases.my-database.conf` - then resource
configurations will be loaded according to namespaces as well; for example, `databases.conf`.
name - The database name.cluster - The cluster configuration.static Database create(String name, net.kuujo.copycat.cluster.ClusterConfig cluster, DatabaseConfig config)
name - The database name.cluster - The cluster configuration.config - The database configuration.Copyright © 2015. All rights reserved.