Package org.eclipse.emf.cdo.spi.server

## Interface InternalLockManager

- All Superinterfaces:
    `IDurableLockingManager`, `ILockingManager`, `org.eclipse.net4j.util.concurrent.IRWLockManager<java.lang.Object,​IView>`, `org.eclipse.net4j.util.concurrent.IRWOLockManager<java.lang.Object,​IView>`

      public interface InternalLockManager
      extends org.eclipse.net4j.util.concurrent.IRWOLockManager<java.lang.Object,​IView>, ILockingManager

  The type of the to-be-locked objects is either `CDOIDAndBranch` or `CDOID`, depending on whether branching is supported by the repository or not.
  Since:
    3.0
  Author:
    Eike Stepper
  No Implement
    This interface is not intended to be implemented by clients.
  No Extend
    This interface is not intended to be extended by clients.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.common.lock.IDurableLockingManager

      `IDurableLockingManager.LockArea, IDurableLockingManager.LockAreaAlreadyExistsException, IDurableLockingManager.LockAreaNotFoundException, IDurableLockingManager.LockGrade`

    - ### Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.ILockingManager

      `ILockingManager.DurableViewHandler`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.concurrent.IRWLockManager

      `org.eclipse.net4j.util.concurrent.IRWLockManager.LockType`

  - ### Field Summary

    - ### Fields inherited from interface org.eclipse.net4j.util.concurrent.IRWLockManager

      `NO_WAIT, WAIT`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `IDurableLockingManager.LockArea` | `createLockArea​(InternalView view)` |
    `IDurableLockingManager.LockArea` | `createLockArea​(InternalView view, java.lang.String lockAreaID)` |
    `java.lang.Object` | `getLockEntryObject​(java.lang.Object key)` |
    `IDurableLockingManager.LockGrade` | `getLockGrade​(java.lang.Object key)` |
    `java.lang.Object` | `getLockKey​(CDOID id, CDOBranch branch)` |
    `CDOID` | `getLockKeyID​(java.lang.Object key)` |
    `java.util.Map<CDOID,​IDurableLockingManager.LockGrade>` | `getLocks​(IView view)` |
    `org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>` | `getLockState​(java.lang.Object key)` |
    `java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>>` | `getLockStates()` |
    `InternalRepository` | `getRepository()` |
    `void` | `lock​(boolean explicit, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, IView context, java.util.Collection<? extends java.lang.Object> objects, long timeout)` | Deprecated.
    `java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>>` | `lock2​(boolean explicit, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, IView context, java.util.Collection<? extends java.lang.Object> objects, boolean recursive, long timeout)` |
    `IView` | `openView​(ISession session, int viewID, boolean readOnly, java.lang.String durableLockingID)` |
    `void` | `reloadLocks()` |
    `void` | `setLockState​(java.lang.Object key, org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView> lockState)` |
    `void` | `setRepository​(InternalRepository repository)` |
    `void` | `unlock​(boolean explicit, IView context)` | Deprecated.
    `void` | `unlock​(boolean explicit, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, IView context, java.util.Collection<? extends java.lang.Object> objects)` | Deprecated.
    `java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>>` | `unlock2​(boolean explicit, IView context)` |
    `java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>>` | `unlock2​(boolean explicit, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type, IView context, java.util.Collection<? extends java.lang.Object> objects, boolean recursive)` |
    `void` | `updateLockArea​(IDurableLockingManager.LockArea lockArea)` |

    - ### Methods inherited from interface org.eclipse.emf.cdo.common.lock.IDurableLockingManager

      `createLockArea, deleteLockArea, getLockArea, getLockAreas`

    - ### Methods inherited from interface org.eclipse.emf.cdo.server.ILockingManager

      `addDurableViewHandler, getDurableViewHandlers, removeDurableViewHandler`

    - ### Methods inherited from interface org.eclipse.net4j.util.concurrent.IRWLockManager

      `hasLock, hasLockByOthers, lock, lock, unlock, unlock`

    - ### Methods inherited from interface org.eclipse.net4j.util.concurrent.IRWOLockManager

      `lock2, unlock2, unlock2, unlock2`

- - ### Method Detail

    - #### getRepository

          InternalRepository getRepository()

    - #### setRepository

          void setRepository​(InternalRepository repository)

    - #### getLockEntryObject

          java.lang.Object getLockEntryObject​(java.lang.Object key)

      Since:
        4.0

    - #### getLockKey

          java.lang.Object getLockKey​(CDOID id,
                                      CDOBranch branch)

      Since:
        4.0

    - #### getLockKeyID

          CDOID getLockKeyID​(java.lang.Object key)

      Since:
        4.0

    - #### getLocks

          java.util.Map<CDOID,​IDurableLockingManager.LockGrade> getLocks​(IView view)

      Since:
        4.0

    - #### lock

          @Deprecated
          void lock​(boolean explicit,
                    org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type,
                    IView context,
                    java.util.Collection<? extends java.lang.Object> objects,
                    long timeout)
             throws java.lang.InterruptedException

      Deprecated.
      Throws:
        `java.lang.InterruptedException`
      Since:
        4.0

    - #### lock2

          java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>> lock2​(boolean explicit,
                                                                                                                         org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type,
                                                                                                                         IView context,
                                                                                                                         java.util.Collection<? extends java.lang.Object> objects,
                                                                                                                         boolean recursive,
                                                                                                                         long timeout)
                                                                                                                  throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`
      Since:
        4.1

    - #### unlock

          @Deprecated
          void unlock​(boolean explicit,
                      org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type,
                      IView context,
                      java.util.Collection<? extends java.lang.Object> objects)

      Deprecated.
      Attempts to release for a given locktype, view and objects.
      Throws:
        `java.lang.IllegalMonitorStateException` - Unlocking objects without lock.
      Since:
        4.0

    - #### unlock2

          java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>> unlock2​(boolean explicit,
                                                                                                                           org.eclipse.net4j.util.concurrent.IRWLockManager.LockType type,
                                                                                                                           IView context,
                                                                                                                           java.util.Collection<? extends java.lang.Object> objects,
                                                                                                                           boolean recursive)

      Since:
        4.1

    - #### unlock

          @Deprecated
          void unlock​(boolean explicit,
                      IView context)

      Deprecated.
      Attempts to release all locks(read and write) for a given view.
      Since:
        4.0

    - #### unlock2

          java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>> unlock2​(boolean explicit,
                                                                                                                           IView context)

      Since:
        4.1

    - #### createLockArea

          IDurableLockingManager.LockArea createLockArea​(InternalView view)

      Since:
        4.0

    - #### createLockArea

          IDurableLockingManager.LockArea createLockArea​(InternalView view,
                                                         java.lang.String lockAreaID)

      Since:
        4.1

    - #### updateLockArea

          void updateLockArea​(IDurableLockingManager.LockArea lockArea)

      Since:
        4.1

    - #### openView

          IView openView​(ISession session,
                         int viewID,
                         boolean readOnly,
                         java.lang.String durableLockingID)

      Since:
        4.0

    - #### getLockGrade

          IDurableLockingManager.LockGrade getLockGrade​(java.lang.Object key)

      Since:
        4.1

    - #### getLockState

          org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView> getLockState​(java.lang.Object key)

      Since:
        4.1

    - #### getLockStates

          java.util.List<org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView>> getLockStates()

      Since:
        4.4

    - #### setLockState

          void setLockState​(java.lang.Object key,
                            org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​IView> lockState)

      Since:
        4.1

    - #### reloadLocks

          void reloadLocks()

      Since:
        4.1