com.arjuna.ats.txoj.semaphore
Class Semaphore

java.lang.Object
  extended bycom.arjuna.ats.txoj.semaphore.Semaphore

public class Semaphore
extends java.lang.Object

Semaphore interface. Binds to interpreter specific implementation.

Since:
JTS 1.0.
Version:
$Id: Semaphore.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)

Field Summary
static int SM_ERROR
           
static int SM_LOCKED
           
static int SM_UNLOCKED
           
static int SM_WOULD_BLOCK
           
 
Constructor Summary
Semaphore(ClassName type)
           
Semaphore(ObjectName objName)
           
Semaphore(java.lang.String key)
          Create a semaphore with the default implementation.
 
Method Summary
 ClassName className()
           
 void finalize()
           
 int lock()
           
 int tryLock()
           
 int unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SM_LOCKED

public static final int SM_LOCKED
See Also:
Constant Field Values

SM_UNLOCKED

public static final int SM_UNLOCKED
See Also:
Constant Field Values

SM_WOULD_BLOCK

public static final int SM_WOULD_BLOCK
See Also:
Constant Field Values

SM_ERROR

public static final int SM_ERROR
See Also:
Constant Field Values
Constructor Detail

Semaphore

public Semaphore(java.lang.String key)
Create a semaphore with the default implementation.


Semaphore

public Semaphore(ClassName type)

Semaphore

public Semaphore(ObjectName objName)
Method Detail

finalize

public void finalize()

lock

public int lock()

unlock

public int unlock()

tryLock

public int tryLock()

className

public ClassName className()