public abstract class WhileLockedProcessor extends Object
Lock
provided by
LockRegistry
A typical usage would be to provide implementation of whileLocked()
method and
then call doWhileLocked()
Constructor and Description |
---|
WhileLockedProcessor(LockRegistry lockRegistry,
Object key) |
Modifier and Type | Method and Description |
---|---|
void |
doWhileLocked() |
protected abstract void |
whileLocked()
Override this method to provide the behavior that needs to be executed
while under the lock.
|
public WhileLockedProcessor(LockRegistry lockRegistry, Object key)
public final void doWhileLocked() throws IOException
IOException
protected abstract void whileLocked() throws IOException
IOException
- Any IOException.