Class CTSDataLayer


  • public class CTSDataLayer
    extends Object
    Protected Static Helper Accessor class to Access the protected SMDataLayer. Allows us to securely hack around the accessing a package protected resource.
    Author:
    jeff.schenk@forgerock.com
    • Method Detail

      • getSharedSMDataLayerAccessor

        public static CTSDataLayer getSharedSMDataLayerAccessor()
        Allow restricted Access by specific Class Caller without using Java Security.
        Returns:
        CTSDataLayer - Wrapper Accessor Class for Shared SM Data Layer Instance.
      • getConnection

        public org.forgerock.opendj.ldap.Connection getConnection()
        Obtain a Connection from the Shared Pool
        Returns:
        LDAPConnection - Obtained from Pool
      • releaseConnection

        public void releaseConnection​(org.forgerock.opendj.ldap.Connection ldapConnection)
        Release an obtained Connection back to the pool.
        Parameters:
        ldapConnection -
      • releaseConnection

        public void releaseConnection​(org.forgerock.opendj.ldap.Connection ldapConnection,
                                      int ldapErrorCode)
        Release an obtained Connection back to the pool, with a specified return code for clean-up.
        Parameters:
        ldapConnection -
        ldapErrorCode -
      • releaseConnection

        public void releaseConnection​(org.forgerock.opendj.ldap.Connection ldapConnection,
                                      Exception lastLDAPException)
        Release an obtained Connection back to the pool, with a specified Last LDAP Stack Exception for clean-up.
        Parameters:
        ldapConnection -
        lastLDAPException - - Last up Stream LDAP Exception, can be null if no issues arose with the connection or operations.