[Flashr] Priority Queue Question
Kelvin Luck
kelvin at kelvinluck.com
Sun Sep 10 05:53:35 EDT 2006
Hi,
Glad you figured out a way to get it working but your feature request
makes lots of sense. I'll try and add this in ASAP before officially
releasing 0.5,
Cheers,
Kelvin :)
p.s. The FlashrRequestQueue is available as Flashr.getInstance().queue (
http://flashr.kelvinluck.com/assets/0.5/docs/files/com/kelvinluck/flashr/core/Flashr-as.html#com.kelvinluck.flashr.core.Flashr.queue
) and that is probably the recommended way to access it as you probably
already have a reference to the Flashr instance anyway.
Mario Klingemann wrote:
> Okay, looks like this here works:
>
> _flashrQueue = FlashrRequestQueue.getInstance();
> [...]
> _flashrQueue.removeFromQueue( storedRequest ) ;
> _flashrQueue.addToQueue( storedRequest , -1 ) ;
>
> I think it would be nice to have something like:
>
> _flashrQueue.setPriority( storedRequest , x ) ;
> and
> _flashrQueue.getLowestPriority();
>
> Mario
>
>
> Mario Klingemann schrieb:
>> Looks like I'm blind, but I do not find the way how to change the
>> priority of a request after I have sent it to the queue.
>>
>> What I want to achieve is that for example after I have sent off 50
>> requests, I discover that the user wants to see request #25 first. So
>> in that case I'd like to move request #25 to the front of the queue.
>> I'd image to have something like a FlashrRequest.processNext() method.
>>
>> Or is the currently intended method to cancel the old request and then
>> use a new one with executeAtPriority
>> <#com.kelvinluck.flashr.core.Flashr.executeAtPriority>() ?
>>
>> Mario
More information about the Flashr
mailing list