mirror of https://github.com/apache/activemq.git
added better synchronization
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@550797 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8a5387f6ad
commit
8a0157a506
|
@ -307,12 +307,14 @@ public class UsageManager implements Service{
|
|||
}
|
||||
|
||||
private void setPercentUsage(int value) {
|
||||
synchronized (usageMutex) {
|
||||
int oldValue = percentUsage;
|
||||
percentUsage = value;
|
||||
if( oldValue!=value ) {
|
||||
fireEvent(oldValue, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int caclPercentUsage() {
|
||||
if( limit==0 ) return 0;
|
||||
|
|
Loading…
Reference in New Issue