|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.log.WriteLock
public class WriteLock
This class implements a write locking mechanism by acquiring an exclusive lock on a named operating system file. The lock mechanism is used to prevent multiple processes from writing to disk logs.
| Constructor Summary | |
|---|---|
WriteLock(java.io.File lockFile)
Instantiates the write lock instance. |
|
| Method Summary | |
|---|---|
boolean |
acquire()
Attempt to acquire write lock. |
boolean |
isLocked()
Return true if the write lock is currently acquired exclusively. |
void |
release()
Release the write lock. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WriteLock(java.io.File lockFile)
throws ReplicatorException
lockFile -
ReplicatorException| Method Detail |
|---|
public boolean acquire()
throws ReplicatorException
ReplicatorExceptionpublic boolean isLocked()
public void release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||