Interface PoolingRepository

    • Method Detail

      • returnSession

        void returnSession​(Session session)
        Returns the session to the pool.

        Note: There is no guard to prevent an object being returned to the pool multiple times. Clients are expected to discard references to returned objects and ensure that an object is not returned to the pool multiple times in sequence (i.e., without being borrowed again between returns). Violating this contract will result in the same object appearing multiple times in the pool and pool counters (numActive, numIdle) returning incorrect values.

        Parameters:
        session -
      • setSessionsRefreshPendingAfter

        void setSessionsRefreshPendingAfter​(long sessionsRefreshPendingTimeMillis)
        Sets time millis to have each session be refreshed on activation if the session is not refreshed after the specified time millis.
        Parameters:
        sessionsRefreshPendingTimeMillis -
      • setSessionsInvalidIfCreatedBeforeTimeMillis

        void setSessionsInvalidIfCreatedBeforeTimeMillis​(long sessionsInvalidIfCreatedBeforeTimeMillis)
        Sets max acceptable PooledSession.timeCreated timestamp, in millis. Sessions created before this time should be disposed of.
      • getPoolingCounter

        PoolingCounter getPoolingCounter()
        Returns pooling counter.
      • isActive

        boolean isActive()
        Returns true if pooling repository is initialized to be available and not closed.
      • isDisposableWhenNotInUse

        boolean isDisposableWhenNotInUse()
        Returns true if pooling repository can be marked to be disposed when not in use. For example, if a pooling repository can be disposable at runtime, then this should return true.
        Returns:
        true if it is possible that this PoolingRepository gets marked to be disposable when it is not in use
        See Also:
        isMarkedForDisposal()