Execute TimerTask in frequent intervals
Olivier ROLAND
olivier.roland at laposte.net
Fri Jun 24 17:09:27 EDT 2011
Note that the timer is created with the default thread factory outside the pipeline and then pass to the pipeline.
It's a shared instance for all your handler.
You will get problem only if you create the time in your handlers.
See HashedWheelTimer Javadoc. There is a warning for that common mistake.
Le 24 juin 2011 à 19:52, qmarqeva a écrit :
> Thanks for reply,
>
> The only way to do that is execute timer.newTimeout really After the
> previous event finished. Really ¿?
>
> Is there any problem related with numbers of threads creates doing this ¿?
>
> Thanks
>
> 2011/6/24 newca12 [via Netty Forums and Mailing Lists] <
> ml-node+6512860-718576254-341245 at n2.nabble.com>
>
>>
>>>
>>> Hi there,
>>>
>>> I have a question, i have a simple server that manages connections... but
>> i
>>> would like to execute a simple task every X time for example each 10
>> seconds
>>> read a file, applying to each individual Channel.
>>>
>>> I was trying to do this with HashedWheelTimer but i only get to execute
>> the
>>> TimeTask only ONE time.
>>>
>>> Thanks for your help.
>>>
>>> Cumar C.
>>> http://qmarqeva.wordpress.com
>>>
>>> --
>>> View this message in context:
>> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Execute-TimerTask-in-frequent-intervals-tp6512826p6512826.html
>>> Sent from the Netty User Group mailing list archive at Nabble.com.
>>> _______________________________________________
>>> netty-users mailing list
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=6512860&i=0>
>>> https://lists.jboss.org/mailman/listinfo/netty-users
>>>
>>
>> You could look at the Uptime example in Netty distribution. It does exactly
>> what you try to do.
>> _______________________________________________
>> netty-users mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=6512860&i=1>
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Execute-TimerTask-in-frequent-intervals-tp6512826p6512860.html
>> To unsubscribe from Execute TimerTask in frequent intervals, click here<http://netty-forums-and-mailing-lists.685743.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6512826&code=cW1hcnFldmFAZ21haWwuY29tfDY1MTI4MjZ8MTYxNDEwOTkxOQ==>.
>>
>>
>
>
>
> --
> Atte,
>
> Cúmar Cueva
>
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Execute-TimerTask-in-frequent-intervals-tp6512826p6512903.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
More information about the netty-users
mailing list