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;
|
||||
}
|
||||
|
||||
public int getMaxProducersToAudit() {
|
||||
public synchronized int getMaxProducersToAudit() {
|
||||
return maxProducersToAudit;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ public class TopicSubscription extends AbstractSubscription {
|
|||
}
|
||||
}
|
||||
|
||||
public int getMaxAuditDepth() {
|
||||
public synchronized int getMaxAuditDepth() {
|
||||
return maxAuditDepth;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ public abstract class AbstractPendingMessageCursor implements PendingMessageCurs
|
|||
* @return the maxProducersToAudit
|
||||
*/
|
||||
@Override
|
||||
public int getMaxProducersToAudit() {
|
||||
public synchronized int getMaxProducersToAudit() {
|
||||
return maxProducersToAudit;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ public abstract class AbstractPendingMessageCursor implements PendingMessageCurs
|
|||
* @return the maxAuditDepth
|
||||
*/
|
||||
@Override
|
||||
public int getMaxAuditDepth() {
|
||||
public synchronized int getMaxAuditDepth() {
|
||||
return maxAuditDepth;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.activemq.management;
|
|||
public class SizeStatisticImpl extends StatisticImpl {
|
||||
|
||||
private long count;
|
||||
private long maxSize;
|
||||
private long minSize;
|
||||
private volatile long maxSize;
|
||||
private volatile long minSize;
|
||||
private long totalSize;
|
||||
private SizeStatisticImpl parent;
|
||||
|
||||
|
@ -94,21 +94,21 @@ public class SizeStatisticImpl extends StatisticImpl {
|
|||
/**
|
||||
* @return the maximum size of any step
|
||||
*/
|
||||
public synchronized void setMaxSize(long size) {
|
||||
public void setMaxSize(long size) {
|
||||
maxSize = size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the minimum size of any step
|
||||
*/
|
||||
public synchronized long getMinSize() {
|
||||
public long getMinSize() {
|
||||
return minSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the maximum size of any step
|
||||
*/
|
||||
public synchronized void setMinSize(long size) {
|
||||
public void setMinSize(long size) {
|
||||
minSize = size;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public class HashIndex<Key,Value> implements Index<Key,Value> {
|
|||
|
||||
private Metadata.Marshaller metadataMarshaller = new Metadata.Marshaller();
|
||||
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;
|
||||
|
||||
|
||||
|
@ -392,7 +392,7 @@ public class HashIndex<Key,Value> implements Index<Key,Value> {
|
|||
*
|
||||
* @param marshaller
|
||||
*/
|
||||
public synchronized void setKeyMarshaller(Marshaller<Key> marshaller) {
|
||||
public void setKeyMarshaller(Marshaller<Key> marshaller) {
|
||||
this.keyMarshaller = marshaller;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue