You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Sanne Grinovero <sa...@gmail.com> on 2009/10/31 14:43:11 UTC

Lock API, throwing IOException

Hello,
I'm implementing a distributed directory based on Infinispan
(www.jboss.org/infinispan)

currently implementing the org.apache.lucene.store.Lock,
I was wondering why is

/** Returns true if the resource is currently locked.  Note that one must
   * still call {@link #obtain()} before using the resource. */
public abstract boolean isLocked();

not throwing an IOException as other methods do?

Could you please add it? It looks like it should be trivial, as all
clients of this API are already declaring to throw the same Exception.

Regards,
Sanne Grinovero

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: Lock API, throwing IOException

Posted by Michael McCandless <lu...@mikemccandless.com>.
OK will do.

Mike

On Sun, Nov 1, 2009 at 11:24 AM, Uwe Schindler <uw...@thetaphi.de> wrote:
> Hi Mike,
>
> I think we need it in the backwards break section of 3.0, because somebody
> may need to now add a catch block. For binary compatibility it has no effect
> (the IOException will be reported as unchecked), but for compile time.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: Sunday, November 01, 2009 2:13 AM
>> To: java-dev@lucene.apache.org
>> Subject: Re: Lock API, throwing IOException
>>
>> OK I just committed this to trunk!
>>
>> Mike
>>
>> On Sun, Nov 1, 2009 at 6:02 AM, Sanne Grinovero
>> <sa...@gmail.com> wrote:
>> > Thanks a lot! This makes error management much simpler.
>> >
>> > Sanne
>> >
>> > 2009/11/1 Michael McCandless <lu...@mikemccandless.com>:
>> >> OK, this makes sense.  I'll add it.
>> >>
>> >> Mike
>> >>
>> >> On Sat, Oct 31, 2009 at 9:43 AM, Sanne Grinovero
>> >> <sa...@gmail.com> wrote:
>> >>> Hello,
>> >>> I'm implementing a distributed directory based on Infinispan
>> >>> (www.jboss.org/infinispan)
>> >>>
>> >>> currently implementing the org.apache.lucene.store.Lock,
>> >>> I was wondering why is
>> >>>
>> >>> /** Returns true if the resource is currently locked.  Note that one
>> must
>> >>>   * still call {@link #obtain()} before using the resource. */
>> >>> public abstract boolean isLocked();
>> >>>
>> >>> not throwing an IOException as other methods do?
>> >>>
>> >>> Could you please add it? It looks like it should be trivial, as all
>> >>> clients of this API are already declaring to throw the same Exception.
>> >>>
>> >>> Regards,
>> >>> Sanne Grinovero
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> >>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>> >>>
>> >>>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> >> For additional commands, e-mail: java-dev-help@lucene.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: java-dev-help@lucene.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


RE: Lock API, throwing IOException

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi Mike,

I think we need it in the backwards break section of 3.0, because somebody
may need to now add a catch block. For binary compatibility it has no effect
(the IOException will be reported as unchecked), but for compile time.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Sunday, November 01, 2009 2:13 AM
> To: java-dev@lucene.apache.org
> Subject: Re: Lock API, throwing IOException
> 
> OK I just committed this to trunk!
> 
> Mike
> 
> On Sun, Nov 1, 2009 at 6:02 AM, Sanne Grinovero
> <sa...@gmail.com> wrote:
> > Thanks a lot! This makes error management much simpler.
> >
> > Sanne
> >
> > 2009/11/1 Michael McCandless <lu...@mikemccandless.com>:
> >> OK, this makes sense.  I'll add it.
> >>
> >> Mike
> >>
> >> On Sat, Oct 31, 2009 at 9:43 AM, Sanne Grinovero
> >> <sa...@gmail.com> wrote:
> >>> Hello,
> >>> I'm implementing a distributed directory based on Infinispan
> >>> (www.jboss.org/infinispan)
> >>>
> >>> currently implementing the org.apache.lucene.store.Lock,
> >>> I was wondering why is
> >>>
> >>> /** Returns true if the resource is currently locked.  Note that one
> must
> >>>   * still call {@link #obtain()} before using the resource. */
> >>> public abstract boolean isLocked();
> >>>
> >>> not throwing an IOException as other methods do?
> >>>
> >>> Could you please add it? It looks like it should be trivial, as all
> >>> clients of this API are already declaring to throw the same Exception.
> >>>
> >>> Regards,
> >>> Sanne Grinovero
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> >>> For additional commands, e-mail: java-dev-help@lucene.apache.org
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> >> For additional commands, e-mail: java-dev-help@lucene.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-dev-help@lucene.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: Lock API, throwing IOException

Posted by Michael McCandless <lu...@mikemccandless.com>.
OK I just committed this to trunk!

Mike

On Sun, Nov 1, 2009 at 6:02 AM, Sanne Grinovero
<sa...@gmail.com> wrote:
> Thanks a lot! This makes error management much simpler.
>
> Sanne
>
> 2009/11/1 Michael McCandless <lu...@mikemccandless.com>:
>> OK, this makes sense.  I'll add it.
>>
>> Mike
>>
>> On Sat, Oct 31, 2009 at 9:43 AM, Sanne Grinovero
>> <sa...@gmail.com> wrote:
>>> Hello,
>>> I'm implementing a distributed directory based on Infinispan
>>> (www.jboss.org/infinispan)
>>>
>>> currently implementing the org.apache.lucene.store.Lock,
>>> I was wondering why is
>>>
>>> /** Returns true if the resource is currently locked.  Note that one must
>>>   * still call {@link #obtain()} before using the resource. */
>>> public abstract boolean isLocked();
>>>
>>> not throwing an IOException as other methods do?
>>>
>>> Could you please add it? It looks like it should be trivial, as all
>>> clients of this API are already declaring to throw the same Exception.
>>>
>>> Regards,
>>> Sanne Grinovero
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: Lock API, throwing IOException

Posted by Sanne Grinovero <sa...@gmail.com>.
Thanks a lot! This makes error management much simpler.

Sanne

2009/11/1 Michael McCandless <lu...@mikemccandless.com>:
> OK, this makes sense.  I'll add it.
>
> Mike
>
> On Sat, Oct 31, 2009 at 9:43 AM, Sanne Grinovero
> <sa...@gmail.com> wrote:
>> Hello,
>> I'm implementing a distributed directory based on Infinispan
>> (www.jboss.org/infinispan)
>>
>> currently implementing the org.apache.lucene.store.Lock,
>> I was wondering why is
>>
>> /** Returns true if the resource is currently locked.  Note that one must
>>   * still call {@link #obtain()} before using the resource. */
>> public abstract boolean isLocked();
>>
>> not throwing an IOException as other methods do?
>>
>> Could you please add it? It looks like it should be trivial, as all
>> clients of this API are already declaring to throw the same Exception.
>>
>> Regards,
>> Sanne Grinovero
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: Lock API, throwing IOException

Posted by Michael McCandless <lu...@mikemccandless.com>.
OK, this makes sense.  I'll add it.

Mike

On Sat, Oct 31, 2009 at 9:43 AM, Sanne Grinovero
<sa...@gmail.com> wrote:
> Hello,
> I'm implementing a distributed directory based on Infinispan
> (www.jboss.org/infinispan)
>
> currently implementing the org.apache.lucene.store.Lock,
> I was wondering why is
>
> /** Returns true if the resource is currently locked.  Note that one must
>   * still call {@link #obtain()} before using the resource. */
> public abstract boolean isLocked();
>
> not throwing an IOException as other methods do?
>
> Could you please add it? It looks like it should be trivial, as all
> clients of this API are already declaring to throw the same Exception.
>
> Regards,
> Sanne Grinovero
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org