cz::muni::stanse::lockchecker::Lock Class Reference

List of all members.

Public Member Functions

 Lock (Lock lock)
 Lock (String id)
String toString ()
int hashCode ()
boolean equals (Object obj)
String getId ()
boolean propagate (Lock lock)
boolean forceUnlocked ()
boolean isLocked ()
boolean isUnlocked ()
void op (boolean isUnlock)
void setId (String id)


Detailed Description

Class representing a lock. Lock has ID and two indicators if it is locked or unlocked which are independent. Lock can be locked and unlocked in the same time (both state can be the case).
Author:
Radim Cebis

Constructor & Destructor Documentation

cz::muni::stanse::lockchecker::Lock::Lock ( Lock  lock  )  [inline]

Copy constructor

Parameters:
lock Lock to be copied

cz::muni::stanse::lockchecker::Lock::Lock ( String  id  )  [inline]

Constructor

Parameters:
id of the lock


Member Function Documentation

String cz::muni::stanse::lockchecker::Lock::toString (  )  [inline]

int cz::muni::stanse::lockchecker::Lock::hashCode (  )  [inline]

boolean cz::muni::stanse::lockchecker::Lock::equals ( Object  obj  )  [inline]

String cz::muni::stanse::lockchecker::Lock::getId (  )  [inline]

boolean cz::muni::stanse::lockchecker::Lock::propagate ( Lock  lock  )  [inline]

Propagates argument lock to this lock. Executes boolean OR operation on lock/unlock indicators.

Parameters:
lock Lock which is propagated to this lock
Returns:
true if the propagation changed this lock

boolean cz::muni::stanse::lockchecker::Lock::forceUnlocked (  )  [inline]

Force this lock to be also unlocked. (does not change lock indicator - only unlock)

Returns:
has this lock changed after operation?

boolean cz::muni::stanse::lockchecker::Lock::isLocked (  )  [inline]

Returns:
locked indicator

boolean cz::muni::stanse::lockchecker::Lock::isUnlocked (  )  [inline]

Returns:
unlock indicator

void cz::muni::stanse::lockchecker::Lock::op ( boolean  isUnlock  )  [inline]

Lock or unlock this lock

Parameters:
isUnlock should this be unlock operation?

void cz::muni::stanse::lockchecker::Lock::setId ( String  id  )  [inline]

Set the lock identifier

Parameters:
id to be set


The documentation for this class was generated from the following file:

Generated on Thu Jan 13 16:24:09 2011 for Stanse by  doxygen 1.5.6