public class LockingVO extends Object implements Locking
LockingEntityVO.| Constructor and Description |
|---|
LockingVO() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRead()
Check is read operation,
LockingReadException will be thrown if read not allowed. |
protected void |
checkWrite()
Check is write operation,
LockingWriteException will be thrown if write not allowed. |
LockingState |
getLockingState()
Get
LockingState. |
boolean |
isReadAllowed()
Is read operation allowed.
|
boolean |
isWriteAllowed()
Is write operation allowed.
|
protected void |
lock(boolean reads,
boolean writes)
Lock object with given configuration.
|
protected void |
unlock()
Unlock object for any operation.
|
public LockingState getLockingState()
LockingLockingState.getLockingState in interface LockingLockingStatepublic boolean isReadAllowed()
LockingisReadAllowed in interface Lockingtrue if allowed or falsepublic boolean isWriteAllowed()
LockingisWriteAllowed in interface Lockingtrue if allowed or falseprotected void checkRead()
LockingReadException will be thrown if read not allowed.protected void checkWrite()
LockingWriteException will be thrown if write not allowed.protected void lock(boolean reads,
boolean writes)
reads - is reads allowedwrites - is writes allowedprotected void unlock()
Copyright © 2013–2019 BB Corp. All rights reserved.