Package com.apple.foundationdb
Class Cluster
- java.lang.Object
-
- com.apple.foundationdb.Cluster
-
- All Implemented Interfaces:
java.lang.AutoCloseable
@Deprecated public class Cluster extends java.lang.ObjectDeprecated.TheClusterrepresents a connection to a physical set of cooperating machines running FoundationDB. AClusteris opened with a reference to a cluster file. This class is deprecated. UseFDB.open()to open aDatabasedirectly
Note:Clusterobjects must beclosedwhen no longer in use in order to free any associated resources.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.locks.LockpointerReadLock
-
Constructor Summary
Constructors Modifier Constructor Description protectedCluster(java.lang.String clusterFile, java.util.concurrent.Executor executor)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcheckUnclosed(java.lang.String context)voidclose()protected voidcloseInternal(long cPtr)Deprecated.protected longgetPtr()booleanisClosed()DatabaseopenDatabase()Deprecated.Creates a connection to the database on an FDB cluster.DatabaseopenDatabase(java.util.concurrent.Executor e)Deprecated.Creates a connection to the database on an FDB cluster.ClusterOptionsoptions()Deprecated.Returns a set of options that can be set on aCluster.
-
-
-
Method Detail
-
options
public ClusterOptions options()
Deprecated.Returns a set of options that can be set on aCluster. In the current version of the API, there are no options that can be set on aCluster.- Returns:
- a set of cluster-specific options affecting this
Cluster
-
openDatabase
public Database openDatabase() throws FDBException
Deprecated.Creates a connection to the database on an FDB cluster.- Returns:
- a
Futurethat will be set to aDatabaseupon successful connection. - Throws:
FDBException
-
openDatabase
public Database openDatabase(java.util.concurrent.Executor e) throws FDBException
Deprecated.Creates a connection to the database on an FDB cluster.- Parameters:
e- theExecutorto use when executing asynchronous callbacks for the database- Returns:
- a
Futurethat will be set to aDatabaseupon successful connection. - Throws:
FDBException
-
closeInternal
protected void closeInternal(long cPtr)
Deprecated.
-
isClosed
public boolean isClosed()
-
checkUnclosed
public void checkUnclosed(java.lang.String context)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
getPtr
protected long getPtr()
-
-