Interface ResourceRegistry


  • public interface ResourceRegistry
    A registry for tracking JDBC resources
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancelLastQuery()  
      boolean hasRegisteredResources()
      Does this registry currently have any registered resources?
      void register​(java.sql.Blob blob)  
      void register​(java.sql.Clob clob)  
      void register​(java.sql.NClob nclob)  
      void register​(java.sql.ResultSet resultSet, java.sql.Statement statement)
      Register a JDBC result set.
      void register​(java.sql.Statement statement, boolean cancelable)
      Register a JDBC statement.
      void release​(java.sql.Blob blob)  
      void release​(java.sql.Clob clob)  
      void release​(java.sql.NClob nclob)  
      void release​(java.sql.ResultSet resultSet, java.sql.Statement statement)
      Release a previously registered result set.
      void release​(java.sql.Statement statement)
      Release a previously registered statement.
      void releaseResources()  
    • Method Detail

      • hasRegisteredResources

        boolean hasRegisteredResources()
        Does this registry currently have any registered resources?
        Returns:
        True if the registry does have registered resources; false otherwise.
      • releaseResources

        void releaseResources()
      • register

        void register​(java.sql.Statement statement,
                      boolean cancelable)
        Register a JDBC statement.
        Parameters:
        statement - The statement to register.
        cancelable - Is the statement being registered capable of being cancelled? In other words, should we register it to be the target of subsequent cancelLastQuery() calls?
      • release

        void release​(java.sql.Statement statement)
        Release a previously registered statement.
        Parameters:
        statement - The statement to release.
      • register

        void register​(java.sql.ResultSet resultSet,
                      java.sql.Statement statement)
        Register a JDBC result set.

        Implementation note: Second parameter has been introduced to prevent multiple registrations of the same statement in case ResultSet.getStatement() does not return original Statement object.

        Parameters:
        resultSet - The result set to register.
        statement - Statement from which ResultSet has been generated.
      • release

        void release​(java.sql.ResultSet resultSet,
                     java.sql.Statement statement)
        Release a previously registered result set.
        Parameters:
        resultSet - The result set to release.
        statement - Statement from which ResultSet has been generated.
      • register

        void register​(java.sql.Blob blob)
      • release

        void release​(java.sql.Blob blob)
      • register

        void register​(java.sql.Clob clob)
      • release

        void release​(java.sql.Clob clob)
      • register

        void register​(java.sql.NClob nclob)
      • release

        void release​(java.sql.NClob nclob)
      • cancelLastQuery

        void cancelLastQuery()