limitExecutionTimeTo (or boundExecutionTimeTo) seems exactly what we are looking for.
WDYT?
On 6 nov. 2010, at 13:12, Gustavo Fernandes wrote:
Solr uses 'timeAllowed' to provide the same functionality,
it's think it's a nice name!
On 6 Nov 2010 11:33, "Sanne Grinovero" <sanne.grinovero(a)gmail.com>
wrote:
> Hello,
> about naming I have no better ideas:
> .limitFetchTime() //slightly different, not very happy about it either
>
> about API, does it really make sense to have hasPartialResults() as a
> method of the Query?
> It should be a List property I think - I have no strong opinions about
> this as I don't like having to extend the List implementation.
>
> But really Query is something I might want to reuse - unlikely but I'd
> expect that to work fine.
> So what about:
>
> SomeNewList results = query.list(500, TimeUnit.MILLISECONDS)
> or a batter named method.
>
> So:
>
> if ( results.hasPartialResults() ) {
> displayWarningToUser();
> }
>
> This is one of those cases in which I miss the option of having a
> couple of values from a function.
>
> Sanne
>
> 2010/11/5 Emmanuel Bernard <emmanuel(a)hibernate.org>:
>> If you can find better name for the API, please advise. I am not happy with the
current version
>>
>> Query luceneQuery = ...;
>> FullTextQuery query = fullTextSession.createFullTextQuery(luceneQuery,
User.class);
>>
>> //define the timeout in seconds
>> query.limitFetchingTime(500, TimeUnit.MILLISECONDS);
>> List results = query.list();
>>
>> if ( query.hasPartialResults() ) {
>> displayWarningToUser();
>> }
>>
>> Emmanuel
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/hibernate-dev