public interface Lockable
Lockable
interface defines methods to set the status of an object
to be locked or unlocked and to determine the status. Depending instances may
use Lockable
instances to determine whether to modify an implementing
instance or keep it untouched. An implementing instance may throw the
org.refcodes.exception.impls.LockedRuntimeException
or the
org.refcodes.exception.impls.LockedException
, depending
whether it wants that exception to be checked or not.Modifier and Type | Method and Description |
---|---|
boolean |
isLocked()
Determines whether the implementing instance is locked.
|
void |
lock()
Locks the implementing instance.
|
void |
unlock()
Unlocks the implementing instance.
|
Copyright © 2017. All rights reserved.