Class TicketLocker
java.lang.Object
fr.ens.biologie.genomique.eoulsan.util.locker.TicketLocker
- All Implemented Interfaces:
Locker
This class define a global locker using RMI messaging. TODO tune waiting times
- Since:
- 1.1
- Author:
- Laurent Jourdren
-
Constructor Summary
ConstructorsConstructorDescriptionTicketLocker(String lockerName, int port) Public constructor.TicketLocker(String lockerName, int port, String description) Public constructor. -
Method Summary
-
Constructor Details
-
TicketLocker
Public constructor.- Parameters:
lockerName- The name of the lockerport- port to use
-
TicketLocker
Public constructor.- Parameters:
lockerName- The name of the lockerport- port to usedescription- locker description
-
-
Method Details
-
lock
Description copied from interface:LockerWait the token and then lock the resource.- Specified by:
lockin interfaceLocker- Throws:
IOException- if an error occurs while locking the resource
-
unlock
Description copied from interface:LockerUnlock the resource.- Specified by:
unlockin interfaceLocker- Throws:
IOException- if an error occurs while unlocking the resource
-
main
Main method.- Parameters:
args- command line arguments- Throws:
RemoteException- if an error occurs while inspecting ticketsMalformedURLException- if the URL of the server is malformed
-