public final class LockManagerImpl extends Object implements LockManager
LockManager.LockableItem, LockManager.LockContext, LockManager.Method
Constructor and Description |
---|
LockManagerImpl() |
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
|
public <T extends LockManager.LockableItem> T getItemForType(Class<T> type)
getItemForType
in interface LockManager
public LockManager.LockContext getCurrentLockContext()
LockManager
getCurrentLockContext
in interface LockManager
public LockManager.LockContext lockItems(LockManager.Method method, LockManager.LockableItem... items)
LockManager
lockItems
in interface LockManager
public LockManager.LockContext lockItems(LockManager.Method method, long timeout, TimeUnit unit, LockManager.LockableItem... items)
LockManager
lockItems
in interface LockManager
public void unlockItems(LockManager.LockContext context)
LockManager
unlockItems
in interface LockManager
Copyright © 2013 JBoss by Red Hat. All rights reserved.