Class Cluster

java.lang.Object
com.apple.foundationdb.Cluster
All Implemented Interfaces:
AutoCloseable

@Deprecated public class Cluster extends Object
Deprecated.
The Cluster represents a connection to a physical set of cooperating machines running FoundationDB. A Cluster is opened with a reference to a cluster file. This class is deprecated. Use FDB.open() to open a Database directly

Note: Cluster objects must be closed when no longer in use in order to free any associated resources.
  • Field Details

    • pointerReadLock

      protected final Lock pointerReadLock
  • Constructor Details

    • Cluster

      protected Cluster(String clusterFile, Executor executor)
      Deprecated.
  • Method Details

    • options

      public ClusterOptions options()
      Deprecated.
      Returns a set of options that can be set on a Cluster. In the current version of the API, there are no options that can be set on a Cluster.
      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 Future that will be set to a Database upon successful connection.
      Throws:
      FDBException
    • openDatabase

      public Database openDatabase(Executor e) throws FDBException
      Deprecated.
      Creates a connection to the database on an FDB cluster.
      Parameters:
      e - the Executor to use when executing asynchronous callbacks for the database
      Returns:
      a Future that will be set to a Database upon successful connection.
      Throws:
      FDBException
    • closeInternal

      protected void closeInternal(long cPtr)
      Deprecated.
    • isClosed

      public boolean isClosed()
    • checkUnclosed

      public void checkUnclosed(String context)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getPtr

      protected long getPtr()