Class ServiceSemaphore
- java.lang.Object
-
- org.apache.ofbiz.service.semaphore.ServiceSemaphore
-
public class ServiceSemaphore extends java.lang.Object
ServiceSemaphore
-
-
Field Summary
Fields Modifier and Type Field Description protected Delegator
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
Constructors Constructor Description ServiceSemaphore(Delegator delegator, ModelService model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquire()
void
release()
-
-
-
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 Delegator 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(Delegator delegator, ModelService model)
-
-
Method Detail
-
acquire
public void acquire() throws SemaphoreWaitException, SemaphoreFailException
-
release
public void release() throws SemaphoreFailException
- Throws:
SemaphoreFailException
-
-