mirror of https://github.com/apache/activemq.git
Merge pull request #449 from PascalSchumacher/setter_getter_synchronization
AMQ-7402: Inconsistent synchronization of getters/setters of some cla…
This commit is contained in:
commit
a9d89572ef
|
@ -504,7 +504,7 @@ public class TopicSubscription extends AbstractSubscription {
|
||||||
this.messageEvictionStrategy = messageEvictionStrategy;
|
this.messageEvictionStrategy = messageEvictionStrategy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxProducersToAudit() {
|
public synchronized int getMaxProducersToAudit() {
|
||||||
return maxProducersToAudit;
|
return maxProducersToAudit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ public class TopicSubscription extends AbstractSubscription {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxAuditDepth() {
|
public synchronized int getMaxAuditDepth() {
|
||||||
return maxAuditDepth;
|
return maxAuditDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ public abstract class AbstractPendingMessageCursor implements PendingMessageCurs
|
||||||
* @return the maxProducersToAudit
|
* @return the maxProducersToAudit
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getMaxProducersToAudit() {
|
public synchronized int getMaxProducersToAudit() {
|
||||||
return maxProducersToAudit;
|
return maxProducersToAudit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ public abstract class AbstractPendingMessageCursor implements PendingMessageCurs
|
||||||
* @return the maxAuditDepth
|
* @return the maxAuditDepth
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int getMaxAuditDepth() {
|
public synchronized int getMaxAuditDepth() {
|
||||||
return maxAuditDepth;
|
return maxAuditDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.activemq.management;
|
||||||
public class SizeStatisticImpl extends StatisticImpl {
|
public class SizeStatisticImpl extends StatisticImpl {
|
||||||
|
|
||||||
private long count;
|
private long count;
|
||||||
private long maxSize;
|
private volatile long maxSize;
|
||||||
private long minSize;
|
private volatile long minSize;
|
||||||
private long totalSize;
|
private long totalSize;
|
||||||
private SizeStatisticImpl parent;
|
private SizeStatisticImpl parent;
|
||||||
|
|
||||||
|
@ -94,21 +94,21 @@ public class SizeStatisticImpl extends StatisticImpl {
|
||||||
/**
|
/**
|
||||||
* @return the maximum size of any step
|
* @return the maximum size of any step
|
||||||
*/
|
*/
|
||||||
public synchronized void setMaxSize(long size) {
|
public void setMaxSize(long size) {
|
||||||
maxSize = size;
|
maxSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the minimum size of any step
|
* @return the minimum size of any step
|
||||||
*/
|
*/
|
||||||
public synchronized long getMinSize() {
|
public long getMinSize() {
|
||||||
return minSize;
|
return minSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the maximum size of any step
|
* @return the maximum size of any step
|
||||||
*/
|
*/
|
||||||
public synchronized void setMinSize(long size) {
|
public void setMinSize(long size) {
|
||||||
minSize = size;
|
minSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class HashIndex<Key,Value> implements Index<Key,Value> {
|
||||||
|
|
||||||
private Metadata.Marshaller metadataMarshaller = new Metadata.Marshaller();
|
private Metadata.Marshaller metadataMarshaller = new Metadata.Marshaller();
|
||||||
private HashBin.Marshaller<Key,Value> hashBinMarshaller = new HashBin.Marshaller<Key,Value>(this);
|
private HashBin.Marshaller<Key,Value> hashBinMarshaller = new HashBin.Marshaller<Key,Value>(this);
|
||||||
private Marshaller<Key> keyMarshaller;
|
private volatile Marshaller<Key> keyMarshaller;
|
||||||
private Marshaller<Value> valueMarshaller;
|
private Marshaller<Value> valueMarshaller;
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ public class HashIndex<Key,Value> implements Index<Key,Value> {
|
||||||
*
|
*
|
||||||
* @param marshaller
|
* @param marshaller
|
||||||
*/
|
*/
|
||||||
public synchronized void setKeyMarshaller(Marshaller<Key> marshaller) {
|
public void setKeyMarshaller(Marshaller<Key> marshaller) {
|
||||||
this.keyMarshaller = marshaller;
|
this.keyMarshaller = marshaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue