directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng, Kai" <kai.zh...@intel.com>
Subject RE: How to implement getIdentities(int start, int limit) more effectively
Date Mon, 06 Jul 2015 05:42:57 GMT
>>... keep it simple and use List<String> getIdentiies() at the moment.
Sounds good to me, thanks!!

>> Cursor already implements Iterable, so if you drink the cool aid fully, you'll get
the equivalent to what you propose.
Well, I guess I need some time to absorb the extra benefit of cursor approach. I will be back
to this topic when I'm ready, to revisit the API for next release.

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Monday, July 06, 2015 1:35 PM
To: kerby@directory.apache.org
Subject: Re: How to implement getIdentities(int start, int limit) more effectively

Le 06/07/15 07:06, Zheng, Kai a écrit :
> Yaning,
>
> How about going on with this simple API change, as previously proposed by Stefan? I thought
it can server well the same purpose for cursor.
>
> List<String> getIdentities(int start, int limit) => Iterator<String> 
> getIdentities()

I'll suggest - again - a different approach :
- either you return a cursor
- or you keep the List<String>

Here is why : Cursor already implements Iterable, so if you drink the cool aid fully, you'll
get the equivalent to what you propose.

But if you consider it's still too much work, then, please, keep it simple and use List<String>
getIdentiies() at the moment.
Mime
View raw message