diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /java/JACE/netsvcs/Token/MutexHandler.java | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'java/JACE/netsvcs/Token/MutexHandler.java')
-rw-r--r-- | java/JACE/netsvcs/Token/MutexHandler.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/java/JACE/netsvcs/Token/MutexHandler.java b/java/JACE/netsvcs/Token/MutexHandler.java deleted file mode 100644 index 82f79fe5a76..00000000000 --- a/java/JACE/netsvcs/Token/MutexHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -package JACE.netsvcs.Token; - -import JACE.Concurrency.*; - -/** - * LockHandler implementation for a mutex lock. - * <P> - * Currently, this uses JACE.Concurrency.Token as the actual lock since - * it supports nested acquires. - * - *@see LockHandler - */ -public class MutexHandler extends LockHandlerAdapter -{ - // Uses token since it supports nested acquires. - static class ExtendedMutex extends Token - { - // This is so that we don't make any assumptions about previous - // implementations of LockAdapter, and enable owner checking with - // the client ID from TokenRequest. The thread name is set in - // handleRequest. - protected Object accessorID () - { - return Thread.currentThread().getName(); - } - } - - /** - * Default constructor. - */ - public MutexHandler () - { - super (new ExtendedMutex ()); - } - - public TokenReply handleRequest (TokenRequestHandler caller, - TokenRequest request) - { - Thread.currentThread().setName (request.clientID ()); - - return super.handleRequest (caller, request); - } - - public void abandonLock (String clientID) - { - Thread.currentThread().setName (clientID); - - super.abandonLock (clientID); - } -} - |