public interface LocalLockHandler
AbstractClusterLockSupport
.Modifier and Type | Method and Description |
---|---|
ClusterNode |
getLocalNode(ClusterNode localNode) |
ClusterNode |
getLockHolder(Serializable lockName)
Gets the node the holds the given lock on this node, or
null if no node holds the lock on this node. |
void |
lockFromCluster(Serializable lockName,
ClusterNode caller,
long timeout)
Try to acquire the local lock within the given timeout.
|
void |
setLocalNode(ClusterNode localNode) |
void |
unlockFromCluster(Serializable lockName,
ClusterNode caller)
Release the lock.
|
ClusterNode getLockHolder(Serializable lockName)
null
if no node holds the lock on this node.lockName
- void lockFromCluster(Serializable lockName, ClusterNode caller, long timeout) throws TimeoutException, InterruptedException
lockName
- the name of the lock.caller
- the node making the requesttimeout
- number of ms the caller will accept waiting before the lock acquisition should be considered a failure. A
value less than one means wait as long as necessary.TimeoutException
- if the lock could not be acquired within the specified timeoutInterruptedException
void unlockFromCluster(Serializable lockName, ClusterNode caller)
lockName
- the name of the lock.caller
- the node making the requestClusterNode getLocalNode(ClusterNode localNode)
void setLocalNode(ClusterNode localNode)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.