[JBoss JIRA] Created: (ISPN-318) Locking could optionally be "fair"
by Manik Surtani (JIRA)
Locking could optionally be "fair"
----------------------------------
Key: ISPN-318
URL: https://jira.jboss.org/jira/browse/ISPN-318
Project: Infinispan
Issue Type: Feature Request
Components: Locking and Concurrency
Affects Versions: 4.0.0.CR3
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 4.0.0.GA
Would require a number of changes:
1. A new boolean field and getter/setter in Configuration.LockingType (follow patterns of other boolean flags here to ensure proper XSD and parser generation), perhaps called "useFairLocking", defaults to false.
2. Modify LockManagerImpl to pass this flag into the LockContainer implementations (in LockManagerImpl#startLockManager())
3. Modify the 4 concrete LockContainer implementations to use this flag when creating new locks. Implementations that use JDK reentrant locks just need to pass the fairness flag into the ReentrantLock constructor.
4. Modify OwnableReentrantLock to handle fairness. Referring to the JDK's ReentrantLock.FairSync may help. OwnableReentrantLock combines features of the JDK ReentrantLock and ReentrantLock.NonFairSync into a single class, so perhaps the best approach is to create a new OwnableFairReentrantLock.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months