public class Cluster
extends java.lang.Object
Cluster represents a connection to a physical set of cooperating machines
running FoundationDB. A Cluster is opened with a reference to a cluster file.Cluster objects must be closed when no longer in use
in order to free any associated resources.| Modifier and Type | Method and Description |
|---|---|
void |
checkUnclosed(java.lang.String context) |
void |
close() |
boolean |
isClosed() |
Database |
openDatabase()
Creates a connection to a specific database on an FDB cluster.
|
Database |
openDatabase(java.util.concurrent.Executor e)
Creates a connection to a specific database on an FDB cluster.
|
ClusterOptions |
options()
Returns a set of options that can be set on a
Cluster. |
public ClusterOptions options()
Cluster. In the current version
of the API, there are no options that can be set on a Cluster.Clusterpublic Database openDatabase() throws FDBException
Future that will be set to a Database upon
successful connection.FDBExceptionpublic Database openDatabase(java.util.concurrent.Executor e) throws FDBException
e - the Executor to use when executing asynchronous callbacks for the databaseFuture that will be set to a Database upon
successful connection.FDBExceptionpublic boolean isClosed()
public void checkUnclosed(java.lang.String context)
public void close()
close in interface java.lang.AutoCloseable