|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rrdService.service.Lock
The class Lock implement a lockItf for writting reading and deleting
- shared variable
Mutex
Field Summary | |
private int |
cptDelete
allow to count the number of deleting access |
private int |
cptRead
allow to count the number of reading access |
private int |
cptWrite
allow to count the number of writting access |
static int |
DELETE
DELETE constante |
static int |
READ
READ constante |
static int |
WRITE
WRITE constante |
Fields inherited from interface rrdService.service.LockItf |
READ_WRITE |
Constructor Summary | |
Lock()
Constructor of class Lock |
Method Summary | |
int |
getStatus()
getStatus return the status of lock return int reprsenting the status READ_WRITE or DELETE |
boolean |
lockDelete()
Lock in deleting acces return boolean true if the lock is taken |
boolean |
lockRead()
Lock in reading acces return boolean true if the lock is taken |
boolean |
lockWrite()
Lock in writting acces return boolean true if the lock is taken |
java.lang.String |
toString()
toString return a string representation of a lock |
boolean |
unLockRead()
Unlock in reading acces return boolean true if the lock is left |
boolean |
unLockWrite()
Unlock in writting acces return boolean true if the lock is left |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int cptDelete
private int cptRead
private int cptWrite
public static final int DELETE
public static final int READ
public static final int WRITE
Constructor Detail |
public Lock()
Method Detail |
public int getStatus()
getStatus
in interface LockItf
public boolean lockDelete() throws java.lang.Exception
lockDelete
in interface LockItf
public boolean lockRead() throws java.lang.Exception
lockRead
in interface LockItf
public boolean lockWrite() throws java.lang.Exception
lockWrite
in interface LockItf
public java.lang.String toString()
toString
in class java.lang.Object
public boolean unLockRead() throws java.lang.Exception
unLockRead
in interface LockItf
public boolean unLockWrite() throws java.lang.Exception
unLockWrite
in interface LockItf
|
Copyright 1885-2001 FIRMENICH SA, Geneva | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |