public class LockManager extends Object
| Constructor and Description |
|---|
LockManager(ReentrantReadWriteLock lock,
String lockName,
ManagementContext ctx,
String lockInterval)
Creates a new instance of LockManager
|
| Modifier and Type | Method and Description |
|---|---|
void |
acquireReadLock()
Acquire Read Lock
|
void |
acquireWriteLock()
Acquire write lock to the in-memory registry lock.
|
void |
downgradeWriteLock()
Downgrade Write Lock
|
void |
releaseReadLock()
Release Read Lock
|
void |
releaseWriteLock()
Release write lock
|
public LockManager(ReentrantReadWriteLock lock, String lockName, ManagementContext ctx, String lockInterval)
lock - - the ReentrantReadWriteLock to be managedlockName - - user friendly name for the lockctx - - management contextlockInterval - - secons to wait for acquiring a registry read/write lock.public void acquireReadLock()
throws RegistryException
a - RegistryException if a Read Lock cannot be obtained after waiting
for the lock intervalRegistryExceptionpublic void acquireWriteLock()
throws RegistryException
a - RegistryException if a Write Lock cannot be obtained after waiting
for the lock wait intervalRegistryExceptionpublic void releaseReadLock()
public void releaseWriteLock()
public void downgradeWriteLock()
throws RegistryException
RegistryException - if the Read Lock cannot be acquired.Copyright © 2011-2016 OpenESB Community. All Rights Reserved.