You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2008/04/18 17:45:30 UTC
svn commit: r649579 - in
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors:
StoreDurableSubscriberCursor.java StoreQueueCursor.java
Author: rajdavies
Date: Fri Apr 18 08:45:29 2008
New Revision: 649579
URL: http://svn.apache.org/viewvc?rev=649579&view=rev
Log:
loosen synchronization around parameter setting - to reduce contention
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java?rev=649579&r1=649578&r2=649579&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreDurableSubscriberCursor.java Fri Apr 18 08:45:29 2008
@@ -251,7 +251,7 @@
return pendingCount;
}
- public synchronized void setMaxBatchSize(int maxBatchSize) {
+ public void setMaxBatchSize(int maxBatchSize) {
for (Iterator<PendingMessageCursor> i = storePrefetches.iterator(); i.hasNext();) {
AbstractPendingMessageCursor tsp = (AbstractPendingMessageCursor)i.next();
tsp.setMaxBatchSize(maxBatchSize);
@@ -266,7 +266,7 @@
}
}
- public synchronized void setSystemUsage(SystemUsage usageManager) {
+ public void setSystemUsage(SystemUsage usageManager) {
super.setSystemUsage(usageManager);
for (Iterator<PendingMessageCursor> i = storePrefetches.iterator(); i.hasNext();) {
PendingMessageCursor tsp = i.next();
@@ -274,28 +274,28 @@
}
}
- public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
+ public void setMaxProducersToAudit(int maxProducersToAudit) {
super.setMaxProducersToAudit(maxProducersToAudit);
for (PendingMessageCursor cursor : storePrefetches) {
cursor.setMaxAuditDepth(maxAuditDepth);
}
}
- public synchronized void setMaxAuditDepth(int maxAuditDepth) {
+ public void setMaxAuditDepth(int maxAuditDepth) {
super.setMaxAuditDepth(maxAuditDepth);
for (PendingMessageCursor cursor : storePrefetches) {
cursor.setMaxAuditDepth(maxAuditDepth);
}
}
- public synchronized void setEnableAudit(boolean enableAudit) {
+ public void setEnableAudit(boolean enableAudit) {
super.setEnableAudit(enableAudit);
for (PendingMessageCursor cursor : storePrefetches) {
cursor.setEnableAudit(enableAudit);
}
}
- public synchronized void setUseCache(boolean useCache) {
+ public void setUseCache(boolean useCache) {
super.setUseCache(useCache);
for (PendingMessageCursor cursor : storePrefetches) {
cursor.setUseCache(useCache);
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java?rev=649579&r1=649578&r2=649579&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/StoreQueueCursor.java Fri Apr 18 08:45:29 2008
@@ -179,25 +179,25 @@
* @see org.apache.activemq.region.cursors.PendingMessageCursor
* @return true if recovery required
*/
- public synchronized boolean isRecoveryRequired() {
+ public boolean isRecoveryRequired() {
return false;
}
/**
* @return the nonPersistent Cursor
*/
- public synchronized PendingMessageCursor getNonPersistent() {
+ public PendingMessageCursor getNonPersistent() {
return this.nonPersistent;
}
/**
* @param nonPersistent cursor to set
*/
- public synchronized void setNonPersistent(PendingMessageCursor nonPersistent) {
+ public void setNonPersistent(PendingMessageCursor nonPersistent) {
this.nonPersistent = nonPersistent;
}
- public synchronized void setMaxBatchSize(int maxBatchSize) {
+ public void setMaxBatchSize(int maxBatchSize) {
persistent.setMaxBatchSize(maxBatchSize);
if (nonPersistent != null) {
nonPersistent.setMaxBatchSize(maxBatchSize);
@@ -206,7 +206,7 @@
}
- public synchronized void setMaxProducersToAudit(int maxProducersToAudit) {
+ public void setMaxProducersToAudit(int maxProducersToAudit) {
super.setMaxProducersToAudit(maxProducersToAudit);
if (persistent != null) {
persistent.setMaxProducersToAudit(maxProducersToAudit);
@@ -216,7 +216,7 @@
}
}
- public synchronized void setMaxAuditDepth(int maxAuditDepth) {
+ public void setMaxAuditDepth(int maxAuditDepth) {
super.setMaxAuditDepth(maxAuditDepth);
if (persistent != null) {
persistent.setMaxAuditDepth(maxAuditDepth);
@@ -226,7 +226,7 @@
}
}
- public synchronized void setEnableAudit(boolean enableAudit) {
+ public void setEnableAudit(boolean enableAudit) {
super.setEnableAudit(enableAudit);
if (persistent != null) {
persistent.setEnableAudit(enableAudit);
@@ -236,7 +236,7 @@
}
}
- public synchronized void setUseCache(boolean useCache) {
+ public void setUseCache(boolean useCache) {
super.setUseCache(useCache);
if (persistent != null) {
persistent.setUseCache(useCache);
@@ -257,7 +257,7 @@
}
}
- public synchronized void setSystemUsage(SystemUsage usageManager) {
+ public void setSystemUsage(SystemUsage usageManager) {
super.setSystemUsage(usageManager);
if (persistent != null) {
persistent.setSystemUsage(usageManager);