org.ofbiz.service.semaphore
Class ServiceSemaphore

java.lang.Object
  extended by org.ofbiz.service.semaphore.ServiceSemaphore

public class ServiceSemaphore
extends java.lang.Object

ServiceSemaphore


Field Summary
protected  GenericDelegator delegator
           
protected  GenericValue lock
           
protected  java.sql.Timestamp lockTime
           
protected  int mode
           
protected  ModelService model
           
static java.lang.String module
           
static int SEMAPHORE_MODE_FAIL
           
static int SEMAPHORE_MODE_NONE
           
static int SEMAPHORE_MODE_WAIT
           
protected  int wait
           
 
Constructor Summary
ServiceSemaphore(GenericDelegator delegator, ModelService model)
           
 
Method Summary
 void acquire()
           
 void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module

SEMAPHORE_MODE_FAIL

public static final int SEMAPHORE_MODE_FAIL
See Also:
Constant Field Values

SEMAPHORE_MODE_WAIT

public static final int SEMAPHORE_MODE_WAIT
See Also:
Constant Field Values

SEMAPHORE_MODE_NONE

public static final int SEMAPHORE_MODE_NONE
See Also:
Constant Field Values

delegator

protected GenericDelegator delegator

lock

protected GenericValue lock

model

protected ModelService model

wait

protected int wait

mode

protected int mode

lockTime

protected java.sql.Timestamp lockTime
Constructor Detail

ServiceSemaphore

public ServiceSemaphore(GenericDelegator delegator,
                        ModelService model)
Method Detail

acquire

public void acquire()
             throws SemaphoreWaitException,
                    SemaphoreFailException
Throws:
SemaphoreWaitException
SemaphoreFailException

release

public void release()
             throws SemaphoreFailException
Throws:
SemaphoreFailException