[
https://issues.apache.org/jira/browse/LUCENE-6508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563926#comment-14563926
]
Uwe Schindler commented on LUCENE-6508:
---------------------------------------
Just for record, so we don't forget:
- the inner class oal.store.Lock.With is obsolete, it is no longer used
anywhere. Can be removed ASAP. It was just there before the famous Java 7
try-with-resources was added. As Lock is closeable now, you can do:
{code:java}
try (Lock lock = directory.obtainLock(name)) {
// do stuff
}
{code}
So the class is obsolete.
> Simplify Directory/lock api
> ---------------------------
>
> Key: LUCENE-6508
> URL: https://issues.apache.org/jira/browse/LUCENE-6508
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Assignee: Uwe Schindler
>
> See LUCENE-6507 for some background. In general it would be great if you can
> just acquire an immutable lock (or you get a failure) and then you close that
> to release it.
> Today the API might be too much for what is needed by IW.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]