Package org.eclipse.emf.cdo.common.lock

## Class CDOLockUtil

- java.lang.Object
- - org.eclipse.emf.cdo.common.lock.CDOLockUtil

-     public final class CDOLockUtil
      extends java.lang.Object

  Various static methods that may help with classes related to CDO locks.
  Since:
    4.1
  Author:
    Caspar De Groot

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DURABLE_SESSION_ID` |
    `static int` | `DURABLE_VIEW_ID` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static CDOLockState` | `copyLockState​(CDOLockState lockState)` |
    `static CDOLockState` | `copyLockState​(CDOLockState lockState, java.lang.Object lockedObject)` |
    `static java.lang.String` | `createDurableLockingID()` |
    `static java.lang.String` | `createDurableLockingID​(int bytes)` |
    `static IDurableLockingManager.LockArea` | `createLockArea​(java.lang.String durableLockingID)` |
    `static IDurableLockingManager.LockArea` | `createLockArea​(java.lang.String durableLockingID, java.lang.String userID, CDOBranchPoint branchPoint, boolean readOnly, java.util.Map<CDOID,​IDurableLockingManager.LockGrade> locks)` |
    `static CDOLockChangeInfo` | `createLockChangeInfo()` |
    `static CDOLockChangeInfo` | `createLockChangeInfo​(long timestamp, CDOCommonView view, CDOBranch viewedBranch, CDOLockChangeInfo.Operation op, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, CDOLockState[] newLockStates)` |
    `static CDOLockChangeInfo` | `createLockChangeInfo​(long timestamp, CDOLockOwner lockOwner, CDOBranch branch, CDOLockChangeInfo.Operation op, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, CDOLockState[] newLockStates)` |
    `static CDOLockOwner` | `createLockOwner​(int sessionID, int viewID, java.lang.String durableLockingID)` |
    `static CDOLockOwner` | `createLockOwner​(CDOCommonView view)` |
    `static CDOLockState` | `createLockState​(java.lang.Object target)` |
    `static CDOLockState` | `createLockState​(org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​? extends CDOCommonView> lockState)` |
    `static CDOBranch` | `getLockedObjectBranch​(java.lang.Object lockedObject)` |
    `static CDOID` | `getLockedObjectID​(java.lang.Object lockedObject)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DURABLE_SESSION_ID

          public static final int DURABLE_SESSION_ID

      Since:
        4.14
      See Also:
        Constant Field Values

    - #### DURABLE_VIEW_ID

          public static final int DURABLE_VIEW_ID

      Since:
        4.14
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getLockedObjectID

          public static CDOID getLockedObjectID​(java.lang.Object lockedObject)

      Since:
        4.12

    - #### getLockedObjectBranch

          public static CDOBranch getLockedObjectBranch​(java.lang.Object lockedObject)

      Since:
        4.12

    - #### copyLockState

          public static CDOLockState copyLockState​(CDOLockState lockState)

    - #### copyLockState

          public static CDOLockState copyLockState​(CDOLockState lockState,
                                                   java.lang.Object lockedObject)

      Since:
        4.12

    - #### createLockState

          public static CDOLockState createLockState​(java.lang.Object target)

    - #### createLockState

          public static CDOLockState createLockState​(org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<java.lang.Object,​? extends CDOCommonView> lockState)

    - #### createLockOwner

          public static CDOLockOwner createLockOwner​(CDOCommonView view)

    - #### createLockOwner

          public static CDOLockOwner createLockOwner​(int sessionID,
                                                     int viewID,
                                                     java.lang.String durableLockingID)

      Since:
        4.14

    - #### createLockChangeInfo

          public static CDOLockChangeInfo createLockChangeInfo​(long timestamp,
                                                               CDOLockOwner lockOwner,
                                                               CDOBranch branch,
                                                               CDOLockChangeInfo.Operation op,
                                                               org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType,
                                                               CDOLockState[] newLockStates)

    - #### createLockChangeInfo

          public static CDOLockChangeInfo createLockChangeInfo()

    - #### createLockChangeInfo

          public static CDOLockChangeInfo createLockChangeInfo​(long timestamp,
                                                               CDOCommonView view,
                                                               CDOBranch viewedBranch,
                                                               CDOLockChangeInfo.Operation op,
                                                               org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType,
                                                               CDOLockState[] newLockStates)

    - #### createLockArea

          public static IDurableLockingManager.LockArea createLockArea​(java.lang.String durableLockingID,
                                                                       java.lang.String userID,
                                                                       CDOBranchPoint branchPoint,
                                                                       boolean readOnly,
                                                                       java.util.Map<CDOID,​IDurableLockingManager.LockGrade> locks)

    - #### createLockArea

          public static IDurableLockingManager.LockArea createLockArea​(java.lang.String durableLockingID)

    - #### createDurableLockingID

          public static java.lang.String createDurableLockingID()

    - #### createDurableLockingID

          public static java.lang.String createDurableLockingID​(int bytes)