public interface LockManager
Modifier and Type | Interface and Description |
---|---|
static interface |
LockManager.LockableItem
A lockable item that supports a
ReentrantLock |
static interface |
LockManager.LockContext |
static class |
LockManager.Method |
Modifier and Type | Method and Description |
---|---|
LockManager.LockContext |
getCurrentLockContext()
Get the lock context associated with the current thread.
|
<T extends LockManager.LockableItem> |
getItemForType(Class<T> type) |
LockManager.LockContext |
lockItems(LockManager.Method method,
LockManager.LockableItem... items)
Lock the number of given items
|
LockManager.LockContext |
lockItems(LockManager.Method method,
long timeout,
TimeUnit unit,
LockManager.LockableItem... items)
Lock the number of given items with timeout
|
void |
unlockItems(LockManager.LockContext context)
Unlock the context
|
<T extends LockManager.LockableItem> T getItemForType(Class<T> type)
LockManager.LockContext getCurrentLockContext()
LockManager.LockContext lockItems(LockManager.Method method, LockManager.LockableItem... items)
LockManager.LockContext lockItems(LockManager.Method method, long timeout, TimeUnit unit, LockManager.LockableItem... items)
void unlockItems(LockManager.LockContext context)
Copyright © 2013 JBoss by Red Hat. All rights reserved.