Re: [pool] should addObject return a boolean?

2011-09-21 Thread markt
Phil Steitz wrote: >When GKOP or GOP pools lack capacity, addObject does nothing. In >some cases (I am dealing with one now internally to GKOP), it would >be good to know if an instance was actually added or not. How about >changing the interface (both OP and KOP versions) to return a >boolean

Re: [pool] should addObject return a boolean?

2011-09-20 Thread Paul Benedict
I think a boolean is a good indicator for whether the operation was honored or not. Paul On Tue, Sep 20, 2011 at 11:41 PM, Gary Gregory wrote: > On Wed, Sep 21, 2011 at 12:09 AM, Phil Steitz wrote: > >> On 9/20/11 8:24 PM, Gary Gregory wrote: >> > That sounds reasonable. >> > >> > Would any cal

Re: [pool] should addObject return a boolean?

2011-09-20 Thread Gary Gregory
On Wed, Sep 21, 2011 at 12:09 AM, Phil Steitz wrote: > On 9/20/11 8:24 PM, Gary Gregory wrote: > > That sounds reasonable. > > > > Would any call sites prefer an exception. Checked or unchecked? > > I suppose in some cases some clients / pool implementations might > want to throw IllegalStateExce

Re: [pool] should addObject return a boolean?

2011-09-20 Thread Phil Steitz
On 9/20/11 8:24 PM, Gary Gregory wrote: > That sounds reasonable. > > Would any call sites prefer an exception. Checked or unchecked? I suppose in some cases some clients / pool implementations might want to throw IllegalStateException if an attempt is made to add to a pool at capacity, but there

[pool] should addObject return a boolean?

2011-09-20 Thread Phil Steitz
When GKOP or GOP pools lack capacity, addObject does nothing. In some cases (I am dealing with one now internally to GKOP), it would be good to know if an instance was actually added or not. How about changing the interface (both OP and KOP versions) to return a boolean with true indicating that