Thanks a lot again. That would help. 
But still, is there any implementations I can find on the web? I crawled the 
web but can't find anything related this issue. Has anyone worked on this 
before?

Emre


-----Original Message-----
From: Emmanuel Lécharny [mailto:[email protected]] 
Sent: Friday, January 24, 2014 10:01 AM
To: [email protected]
Subject: Re: IoServiceStatistics vs StatCollector

Le 1/24/14 8:14 AM, Emre Baykal a écrit :
> Thanks! 
> What I would like to know is the way it collects statistics. Apparently there 
> is no start() or stop() method in order to start worker thread. Could you 
> provide me an example? 

We use the session's thread to update those statistics. For instance:

    public void fireMessageSent(WriteRequest request) {
        session.increaseWrittenMessages(request,
System.currentTimeMillis());
        ...

We then do not need a dedicated thread to manage those statistics.


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to