|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdsf.dl.LockObject
public class LockObject
This class is a Framework for synchronizing different processes that run on different JVM and event uppon different computers. Currently we implemented on the synchronization ability unfortunatly synchronize is a java keyword that can not be overriden so we had to use the getLock an releaseLock methods To make the the solution complete we added the notifyFor, notifyAllFor and waitFor methods, that acts like the notify, notifyAll, wait methods (accordingly)
| Method Summary | |
|---|---|
static void |
getLock(java.lang.String lockName)
this method will achieve the lock on the specified String. |
static void |
notifyAllFor(java.lang.String lockName)
This method will notify on the current lock name, this notification will be caught bt all waiting instances. |
static void |
notifyFor(java.lang.String lockName)
This method will notify on the current lock name, this notification can be caught by only one wait method. |
static void |
releaseLock(java.lang.String lockName)
this method will release the lock on the specified String. |
static void |
waitFor(java.lang.String lockName)
This method will wait for a notification on the specified string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void getLock(java.lang.String lockName)
lockName - a lock String that should be the same on all instances
of the code
java.lang.IllegalMonitorStateExceptionpublic static void releaseLock(java.lang.String lockName)
lockName - a lock String that should be the same on all instances
of the code
java.lang.IllegalMonitorStateException - if the monitor is not captured by
this Thread
public static void waitFor(java.lang.String lockName)
throws java.lang.InterruptedException
lockName - a lock String that should be the same on all instances
of the code
java.lang.InterruptedExceptionpublic static void notifyFor(java.lang.String lockName)
lockName - a lock String that should be the same on all instances
of the codepublic static void notifyAllFor(java.lang.String lockName)
lockName - a lock String that should be the same on all instances
of the code
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||