cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <ning.ji...@iona.com>
Subject Re: svn commit: r537737 [1/2]
Date Tue, 15 May 2007 07:42:38 GMT
Hi Dan,

Thanks for your note.
I will do a quick update for it.

Cheers,

Willem.
Daniel Kulp wrote:
> Willem,
>
> Just a quick note....
>
> Did you give any thought of using an 
> java.util.concurrent.atomic.AtomicInteger for the invocations count?    
> You could then avoid the synchronized stuff.
>
>
> Dan
>
>
> On Monday 14 May 2007 03:11, ningjiang@apache.org wrote:
>   
>> +public class PerformanceCounter implements PerformanceCounterMBean,
>> Counter { +    private int invocations;
>> +    private ObjectName objectName;
>> +
>> +    public PerformanceCounter(ObjectName on) {
>> +        objectName = on;
>> +    }
>> +
>> +    public Number getNumInvocations() {        
>> +        return invocations;
>> +    }
>> +
>> +    public synchronized void increase(MessageHandlingTimeRecorder
>> mhtr) { +        invocations++;
>> +    }
>> +
>> +    public ObjectName getObjectName() throws JMException {        
>> +        return objectName;
>> +    }
>>     
>
>   



Mime
View raw message