Interface ExclusiveSessionProvider

All Known Subinterfaces:
ModificationTracker

public interface ExclusiveSessionProvider
An exclusive session provider.

Provides exclusive access to a certain session. Once a session is requested, it cannot be requested by any other thread until it is released. If a thread requests a session more than once, it must release it the appropriate number of times until it gets released.

Notice the difference to the ReturnableSessionProvider, which provides access to a pool of sessions.

Author:
harald
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Releases the session.
    Requests a session for exclusive use.
  • Method Details

    • requestSession

      Session requestSession()
      Requests a session for exclusive use.
      Returns:
      the session
    • releaseSession

      boolean releaseSession(Session session)
      Releases the session.
      Parameters:
      session - the session
      Returns:
      true if released