4A Server -
2.0
|
Class represents the document protection, and provides methods to lock. More...
Public Member Functions | |
Padlock (Integer documentId) | |
Integer | getDocumentId () |
synchronized boolean | lockForRead () |
synchronized void | unlockForRead () |
synchronized boolean | lockForChange () |
synchronized void | unlockForChange () |
Package Attributes | |
Integer | documentId |
boolean | isLocked |
boolean | waitForUpdate |
int | readersCount |
Class represents the document protection, and provides methods to lock.
Class represents the document protection, and provides methods to lock.
Definition at line 22 of file Padlock.java.
cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.Padlock | ( | Integer | documentId | ) |
Constructor
documentId | id of document that lock belongs |
Definition at line 40 of file Padlock.java.
Integer cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.getDocumentId | ( | ) |
Gets id of document that is locked.
Definition at line 52 of file Padlock.java.
synchronized boolean cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.lockForChange | ( | ) |
Method try to lock document for change, if there some other thread that locks document before, current thread will be suspended.
Definition at line 94 of file Padlock.java.
synchronized boolean cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.lockForRead | ( | ) |
Method try to lock document for read, if there some other thread that locks document before, current thread will be suspended.
Definition at line 62 of file Padlock.java.
synchronized void cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.unlockForChange | ( | ) |
Method unlocks document for read operations, all suspended threads will be make runable.
Definition at line 123 of file Padlock.java.
synchronized void cz.vutbr.fit.knot.annotations.comet.documentLock.Padlock.unlockForRead | ( | ) |
Method unlocks document for read operations, all suspended threads will be make runable.
Definition at line 81 of file Padlock.java.
|
package |
id of document that lock belongs
Definition at line 24 of file Padlock.java.
|
package |
paramether indicate locked document
Definition at line 27 of file Padlock.java.
|
package |
count of readers of document
Definition at line 33 of file Padlock.java.
|
package |
paramether indicate that some thread waits for change
Definition at line 30 of file Padlock.java.