[jboss-jira] [JBoss JIRA] (JGRP-1886) CENTRAL_LOCK: provide option to make a node the lock owner instead of node:thread
Bela Ban (JIRA)
issues at jboss.org
Tue Sep 30 05:10:03 EDT 2014
[ https://issues.jboss.org/browse/JGRP-1886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bela Ban resolved JGRP-1886.
----------------------------
Resolution: Done
> CENTRAL_LOCK: provide option to make a node the lock owner instead of node:thread
> ---------------------------------------------------------------------------------
>
> Key: JGRP-1886
> URL: https://issues.jboss.org/browse/JGRP-1886
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.6
>
>
> When using distributed locks, we currently use {{Owner}} as identity that holds a lock. {{Owner}} consists of the node's address and the thread's ID.
> This has the same semantics as {{ReentrantLock}} which makes the thread which called {{Lock.lock()}} the owner.
> However, in some scenarios, this is too strong and some applications only want the current node to be the lock owner. This is needed in cases where thread T1 locks a lock but thread T2 needs to unlock it.
> This means, however, that all threads in a given node can lock or unlock the same lock.
> h4. Solution
> * Add property {{use_thread_id_for_lock_owner}} to {{CENTRAL_LOCK}} (default: false)
> * When set, {{getOwner()}} sets the thread-id to -1
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jboss-jira
mailing list