Class AbstractNoSqlConnection<W,T extends NoSqlObject<W>>

Type Parameters:
W - See NoSqlConnection.
T - See NoSqlConnection.
All Implemented Interfaces:
Closeable, AutoCloseable, NoSqlConnection<W,T>

public abstract class AbstractNoSqlConnection<W,T extends NoSqlObject<W>> extends Object implements NoSqlConnection<W,T>
Facilitates implementations of NoSqlConnection.
  • Constructor Details

    • AbstractNoSqlConnection

      public AbstractNoSqlConnection()
  • Method Details

    • close

      public void close()
      Description copied from interface: NoSqlConnection
      Closes the underlying connection. This method call should be idempotent. Only the first call should have any effect; all further calls should be ignored. It's possible the underlying connection is stateless (such as an HTTP web service), in which case this method would be a no-op. This method should also commit any open transactions, if applicable and if not already committed.

      If this connection is part of a connection pool, executing this method should commit the transaction and return the connection to the pool, but it should not actually close the underlying connection.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface NoSqlConnection<W,T extends NoSqlObject<W>>
    • closeImpl

      protected abstract void closeImpl()
    • isClosed

      public boolean isClosed()
      Description copied from interface: NoSqlConnection
      Indicates whether the underlying connection is closed. If the underlying connection is stateless (such as an HTTP web service), this method would likely always return true. Essentially, this method should only return true if a call to NoSqlConnection.insertObject(NoSqlObject) will fail due to the state of this object.
      Specified by:
      isClosed in interface NoSqlConnection<W,T extends NoSqlObject<W>>
      true if this object is considered closed.