You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "afs (via GitHub)" <gi...@apache.org> on 2023/07/22 07:50:41 UTC

[GitHub] [jena] afs commented on pull request #1967: Capabilities and locks

afs commented on PR #1967:
URL: https://github.com/apache/jena/pull/1967#issuecomment-1646519123

   I was thinking that an MRSW transaction would work as a migration path but it isn't as straight forward as that.
   
   The problem is that graphs have their own API to transactions which does have a distinction of "read" and "write" that can be mapper to "read lock" and "write lock".  Lock promotion isn't supported by Jena's `ReentrantReadWriteLock`.
   
   `SimpleTransactionHandler` does not support transactions. 
   
   For now, it is better to leave `Model.getLock` alone, just revise its javadoc.
   
   I've just come across [StampedLock](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/StampedLock.html) introduced in Java8 which might help.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org