Petri Salmi wrote:
Hi!
I think this is more like Avalon Users stuff, so I am directing the response there.
On 12. maaliskuuta 2003 22:39, Filip Defoort [mailto:[EMAIL PROTECTED] wrote:
Hi,
Couple of questions reg. the CommandQueue (in same spirit of the ones reg. the Cache):
1/ is it possible to "manage"/"view" a Queue, that is can a Queue be
queried to see which commands are running + can running commands be interrupted (I know this is a though one, but I still need some
way of interrupting long operations, the well-known dough-experience)
AFAIK, the commands are run in for as long as it takes them to complete.
I would suggest that you wrap your long running commands within a monitoring instance that can interrupt the process if required.
One way you can have a command *act* like a long running command is
to use a RepeatedCommand. For things like monitoring resources or
doing periodic background checks, it is indispensible.
Hi guys,
thanks for the replies -- your help is very appreciated!
In my case, the long running command will be pumping files from one location to
another, so will actually be doing something most of the time (not sure that I can
figure out in java how to pass something off to the underlying hardware and not
have to worry about it).
So, I'm still faced with the problem of putting a long running command in the
CommandQueue (which in itself is not a problem -- and I'll look at Berin's suggestion --
maybe yielding the thread with the repeated command for every block of data
would give better interactivity/cooperation with everything else?) and especially
being able to interrupt that one.
I don't see how I can make Petri's solution work together with the CommandQueue
easily -- it's creating it's own thread inside of the execute() method which kind of
defeats the purpose, I think (the idea is the have the CommandQueue serve a pool
of threads for use, right?). Not sure if I'm overlooking something or not...
The monitoring solution is nice and elegant, so that part of the puzzle is solved...
Any more suggestions/clarifications for the other parts ??
Thanks again!
- Filip
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
