com.sapportals.portal.pcd.gl

Class LockState

java.lang.Object
  extended by com.sapportals.portal.pcd.gl.LockState

public class LockState
extends Object

LockState is an enumeration type, describing all possible states of a lock object (i.e. instances of ILock). The lock object's state is determined by the content of the lock registry:


Field Summary
static LockState ACTIVE
          State for lock objects that represent a lock stored in the central lock registry.
static int ACTIVE_INT_VALUE
          Integer equivalent of lock state ACTIVE.
static LockState BROKEN
          State of lock objects where the respective resource is locked, but the current owner (combination of user and session) of the lock is not the same as what is returned by methods ILock.getUserId()and ILock.getSessionId().
static int BROKEN_INT_VALUE
          Integer equivalent of lock state BROKEN.
static LockState INACTIVE
          State of lock objects where no entry can be found in the lock registry for the repective resource.
static int INACTIVE_INT_VALUE
          Integer equivalent of lock state INACTIVE.
 
Constructor Summary
LockState(int state)
          For internal use only: Create a LockState object for a given int
 
Method Summary
 boolean equals(LockState lockState)
          Compare this lock state with another one.
 boolean equals(Object lockState)
          Compare this object with this one.
 int getAsInt()
          Return an integer value for this lock state that can be used in switch -statements.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVE_INT_VALUE

public static final int ACTIVE_INT_VALUE
Integer equivalent of lock state ACTIVE.

See Also:
Constant Field Values

ACTIVE

public static final LockState ACTIVE
State for lock objects that represent a lock stored in the central lock registry. This means that the respective resource is still locked by the user returned by ILock.getUserId().


BROKEN_INT_VALUE

public static final int BROKEN_INT_VALUE
Integer equivalent of lock state BROKEN.

See Also:
Constant Field Values

BROKEN

public static final LockState BROKEN
State of lock objects where the respective resource is locked, but the current owner (combination of user and session) of the lock is not the same as what is returned by methods ILock.getUserId()and ILock.getSessionId(). This is the consequence of a ILock.take(String,String, String)-operation performed on the underlying lock.


INACTIVE_INT_VALUE

public static final int INACTIVE_INT_VALUE
Integer equivalent of lock state INACTIVE.

See Also:
Constant Field Values

INACTIVE

public static final LockState INACTIVE
State of lock objects where no entry can be found in the lock registry for the repective resource. Usually, this is the case after the lock has been released and no new lock has been requested for the resource.

Constructor Detail

LockState

public LockState(int state)
For internal use only: Create a LockState object for a given int

Parameters:
state -
Method Detail

equals

public boolean equals(LockState lockState)
Compare this lock state with another one. See java.lang.Object.equals() for details.

Parameters:
lockState -
Returns:
true, if LockStates s are equal; false otherwise

equals

public boolean equals(Object lockState)
Compare this object with this one.

Overrides:
equals in class Object
Returns:
true, if Object s are equal; false otherwise
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getAsInt

public int getAsInt()
Return an integer value for this lock state that can be used in switch -statements.

Returns:
an integer value representing this lock state
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated api BC-PIN-PCD
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api - EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice