[jboss-cvs] JBoss Messaging SVN: r5691 - trunk/src/main/org/jboss/messaging/core/paging/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 22 15:10:27 EST 2009
Author: clebert.suconic at jboss.com
Date: 2009-01-22 15:10:27 -0500 (Thu, 22 Jan 2009)
New Revision: 5691
Modified:
trunk/src/main/org/jboss/messaging/core/paging/impl/PagingManagerImpl.java
Log:
just auto-cleanup and 1 javadoc (no code changes on this commit)
Modified: trunk/src/main/org/jboss/messaging/core/paging/impl/PagingManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/paging/impl/PagingManagerImpl.java 2009-01-22 20:03:36 UTC (rev 5690)
+++ trunk/src/main/org/jboss/messaging/core/paging/impl/PagingManagerImpl.java 2009-01-22 20:10:27 UTC (rev 5691)
@@ -58,7 +58,7 @@
private volatile boolean started = false;
private final long maxGlobalSize;
-
+
private volatile boolean backup;
private final AtomicLong globalSize = new AtomicLong(0);
@@ -95,13 +95,13 @@
final boolean syncNonTransactional,
final boolean backup)
{
- this.pagingStoreFactory = pagingSPI;
+ pagingStoreFactory = pagingSPI;
this.queueSettingsRepository = queueSettingsRepository;
this.storageManager = storageManager;
this.defaultPageSize = defaultPageSize;
this.maxGlobalSize = maxGlobalSize;
this.syncNonTransactional = syncNonTransactional;
- this.backup = backup;
+ this.backup = backup;
}
// Public
@@ -112,17 +112,16 @@
public void activate()
{
- this.backup = false;
-
+ backup = false;
+
startGlobalDepage();
}
-
-
+
public boolean isBackup()
{
- return this.backup;
+ return backup;
}
-
+
public boolean isGlobalPageMode()
{
return globalMode.get();
@@ -140,7 +139,7 @@
{
List<PagingStore> destinations = pagingStoreFactory.reloadStores(queueSettingsRepository);
- for (PagingStore store: destinations)
+ for (PagingStore store : destinations)
{
store.start();
stores.put(store.getStoreName(), store);
@@ -168,6 +167,7 @@
return store;
}
+ /** stores is a ConcurrentHashMap, so we don't need to synchronize this method */
public PagingStore getPageStore(final SimpleString storeName) throws Exception
{
PagingStore store = stores.get(storeName);
@@ -256,7 +256,7 @@
pagingStoreFactory.setPagingManager(this);
pagingStoreFactory.setStorageManager(storageManager);
-
+
reloadStores();
started = true;
@@ -275,13 +275,13 @@
{
store.stop();
}
-
+
stores.clear();
pagingStoreFactory.stop();
-
+
globalSize.set(0);
-
+
globalMode.set(false);
}
More information about the jboss-cvs-commits
mailing list