com.sap.tc.col.client.generic.api
Class LockStrategy
java.lang.Object
|
+--com.sap.tc.col.client.generic.api.LockStrategy
- public class LockStrategy
- extends java.lang.Object
Defines the available lock strategies supported in GCP.
The four supported LockStrategies until now are:
- SHARED_PROMOTABLE_WITH_LOCK_PROMOTION_ON_UPDATE
- EXCLUSIVE
- SHARED_WITH_EXCLUSIVE_LOCK_ON_UPDATE
- SHARED_READ_ONLY
For locking the backend uses the Enqueue Server. With the Enqueue Server locking works with logical locks,
not with physical locks assigned to database records, pages or tables like it works in most Data Base Management System.
The definition of the different strategies are:
SHARED_PROMOTABLE_WITH_LOCK_PROMOTION_ON_UPDATE:
GCP checks the supported lock modes of Aspect (meta data) and then
- if Aspect supports SP locks, a SP lock is acquired
- if Aspect supports E locks, an E lock is acquired
- otherwise an Exception is thrown
When a change request is received for an Aspect, which is locked with SP lock, the GCP
promotes this SP lock to Exclusive. When a change request is received for an Aspect, which is already
locked Exclusive, the GCP does no lock call.
EXCLUSIVE:
GCP checks the supported lock modes of Aspect (meta data) and then
- if Aspect supports E locks, an E lock is acquired
- otherwise an Exception is thrown
SHARED_WITH_EXCLUSIVE_LOCK_ON_UPDATE:
GCP checks the supported lock modes of Aspect (meta data) and then
- if Aspect supports S and E locks, a S lock is acquired
- if Aspect supports E but not S locks, an E lock is acquired
- otherwise an Exception is thrown
When a change request is received for an Aspect, which is locked with S lock, the GCP
promotes this S lock to Exclusive. When a change request is received for an Aspect, which is already
locked Exclusive, the GCP does no lock call.
SHARED_READ_ONLY:
GCP checks the supported lock modes of Aspect (meta data) and then
- if Aspect supports S, a S lock is acquired
- otherwise an Exception is thrown
When a change request is received for an Aspect, which is locked with S lock, the GCP
throws an Exception.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SHARED_PROMOTABLE_WITH_LOCK_PROMOTION_ON_UPDATE
public static final LockStrategy SHARED_PROMOTABLE_WITH_LOCK_PROMOTION_ON_UPDATE
EXCLUSIVE
public static final LockStrategy EXCLUSIVE
SHARED_WITH_EXCLUSIVE_LOCK_ON_UPDATE
public static final LockStrategy SHARED_WITH_EXCLUSIVE_LOCK_ON_UPDATE
SHARED_READ_ONLY
public static final LockStrategy SHARED_READ_ONLY
valueOf
public static LockStrategy valueOf(java.lang.String description)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2002 SAP AG. Automatically generated Thu Mar 3 2005, 21:55