mirror of https://github.com/apache/activemq.git
make use of 'this' more consistent and fix a couple warnings
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@732175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4286731e0f
commit
d8c14e075f
|
@ -153,7 +153,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
* @return the memoryUsageHighWaterMark
|
* @return the memoryUsageHighWaterMark
|
||||||
*/
|
*/
|
||||||
public int getMemoryUsageHighWaterMark() {
|
public int getMemoryUsageHighWaterMark() {
|
||||||
return this.memoryUsageHighWaterMark;
|
return memoryUsageHighWaterMark;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -182,10 +182,10 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
/**
|
/**
|
||||||
* Page in a restricted number of messages
|
* Page in a restricted number of messages
|
||||||
*
|
*
|
||||||
* @param maxItems
|
* @param maxItems maximum number of messages to return
|
||||||
* @return a list of paged in messages
|
* @return a list of paged in messages
|
||||||
*/
|
*/
|
||||||
public LinkedList pageInList(int maxItems) {
|
public LinkedList<MessageReference> pageInList(int maxItems) {
|
||||||
throw new RuntimeException("Not supported");
|
throw new RuntimeException("Not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
|
public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
|
||||||
this.maxProducersToAudit = maxProducersToAudit;
|
this.maxProducersToAudit = maxProducersToAudit;
|
||||||
if (audit != null) {
|
if (audit != null) {
|
||||||
this.audit.setMaximumNumberOfProducersToTrack(maxProducersToAudit);
|
audit.setMaximumNumberOfProducersToTrack(maxProducersToAudit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
* @return the maxAuditDepth
|
* @return the maxAuditDepth
|
||||||
*/
|
*/
|
||||||
public int getMaxAuditDepth() {
|
public int getMaxAuditDepth() {
|
||||||
return this.maxAuditDepth;
|
return maxAuditDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
public synchronized void setMaxAuditDepth(int maxAuditDepth) {
|
public synchronized void setMaxAuditDepth(int maxAuditDepth) {
|
||||||
this.maxAuditDepth = maxAuditDepth;
|
this.maxAuditDepth = maxAuditDepth;
|
||||||
if (audit != null) {
|
if (audit != null) {
|
||||||
this.audit.setAuditDepth(maxAuditDepth);
|
audit.setAuditDepth(maxAuditDepth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
* @return the enableAudit
|
* @return the enableAudit
|
||||||
*/
|
*/
|
||||||
public boolean isEnableAudit() {
|
public boolean isEnableAudit() {
|
||||||
return this.enableAudit;
|
return enableAudit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -237,7 +237,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
*/
|
*/
|
||||||
public synchronized void setEnableAudit(boolean enableAudit) {
|
public synchronized void setEnableAudit(boolean enableAudit) {
|
||||||
this.enableAudit = enableAudit;
|
this.enableAudit = enableAudit;
|
||||||
if (this.enableAudit && started && audit==null) {
|
if (enableAudit && started && audit==null) {
|
||||||
audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
|
audit= new ActiveMQMessageAudit(maxAuditDepth,maxProducersToAudit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the audit
|
* set the audit
|
||||||
* @param audit
|
* @param audit new audit component
|
||||||
*/
|
*/
|
||||||
public void setMessageAudit(ActiveMQMessageAudit audit) {
|
public void setMessageAudit(ActiveMQMessageAudit audit) {
|
||||||
this.audit=audit;
|
this.audit=audit;
|
||||||
|
@ -272,14 +272,14 @@ public class AbstractPendingMessageCursor implements PendingMessageCursor {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected synchronized boolean isDuplicate(MessageId messageId) {
|
protected synchronized boolean isDuplicate(MessageId messageId) {
|
||||||
if (!this.enableAudit || this.audit==null) {
|
if (!enableAudit || audit==null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this.audit.isDuplicate(messageId);
|
return audit.isDuplicate(messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void rollback(MessageId id) {
|
public synchronized void rollback(MessageId id) {
|
||||||
if (this.audit != null) {
|
if (audit != null) {
|
||||||
audit.rollback(id);
|
audit.rollback(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue