[jboss-cvs] JBoss Messaging SVN: r5489 - in trunk: src/main/org/jboss/messaging/core/persistence and 9 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 9 11:36:29 EST 2008
Author: clebert.suconic at jboss.com
Date: 2008-12-09 11:36:28 -0500 (Tue, 09 Dec 2008)
New Revision: 5489
Modified:
trunk/src/main/org/jboss/messaging/core/paging/impl/PagingStoreImpl.java
trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java
trunk/src/main/org/jboss/messaging/core/postoffice/impl/DuplicateIDCacheImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
trunk/tests/src/org/jboss/messaging/tests/timing/core/server/impl/QueueImplTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/persistence/impl/journal/JournalStorageManagerTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueImplTest.java
trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionImplTest.java
Log:
just renaming few methods on StorageManager
Modified: trunk/src/main/org/jboss/messaging/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/paging/impl/PagingStoreImpl.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/paging/impl/PagingStoreImpl.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -793,7 +793,7 @@
{
// http://wiki.jboss.org/wiki/JBossMessaging2Paging
// numberOfReads==numberOfWrites -> We delete the record
- storageManager.storeDeletePageTransaction(depageTransactionID, pageWithTransaction.getRecordID());
+ storageManager.deletePageTransactional(depageTransactionID, pageWithTransaction.getRecordID());
pagingManager.removeTransaction(pageWithTransaction.getTransactionID());
}
else
@@ -895,7 +895,7 @@
{
trace("Clearing lastRecord information " + lastRecord.getLastId());
- storageManager.storeDelete(lastRecord.getRecordId());
+ storageManager.deleteLastPage(lastRecord.getRecordId());
}
private Page createPage(final int page) throws Exception
Modified: trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/persistence/StorageManager.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -57,19 +57,19 @@
void storeMessage(ServerMessage message) throws Exception;
+ void deleteMessage(long messageID) throws Exception;
+
void storeAcknowledge(long queueID, long messageID) throws Exception;
void updateDeliveryCount(MessageReference ref) throws Exception;
void updateScheduledDeliveryTime(MessageReference ref) throws Exception;
-
- void storeDelete(long messageID) throws Exception;
void storeDuplicateID(SimpleString address, SimpleString duplID, long recordID) throws Exception;
void updateDuplicateID(SimpleString address, SimpleString duplID, long recordID) throws Exception;
- void storeDeleteDuplicateID(long recordID) throws Exception;
+ void deleteDuplicateID(long recordID) throws Exception;
void storeMessageTransactional(long txID, ServerMessage message) throws Exception;
@@ -77,13 +77,13 @@
void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws Exception;
- void storeDeleteMessageTransactional(long txID, long queueID, long messageID) throws Exception;
+ void deleteMessageTransactional(long txID, long queueID, long messageID) throws Exception;
void storeDuplicateIDTransactional(long txID, SimpleString address, SimpleString duplID, long recordID) throws Exception;
void updateDuplicateIDTransactional(long txID, SimpleString address, SimpleString duplID, long recordID) throws Exception;
- void storeDeleteDuplicateIDTransactional(long txID, long recordID) throws Exception;
+ void deleteDuplicateIDTransactional(long txID, long recordID) throws Exception;
ServerLargeMessage createLargeMessage();
@@ -96,8 +96,10 @@
void storePageTransaction(long txID, PageTransactionInfo pageTransaction) throws Exception;
void storeLastPage(long txID, LastPageRecord pageTransaction) throws Exception;
+
+ void deleteLastPage(long recordID) throws Exception;
- void storeDeletePageTransaction(long txID, long recordID) throws Exception;
+ void deletePageTransactional(long txID, long recordID) throws Exception;
void loadMessageJournal(PostOffice postOffice,
Map<Long, Queue> queues,
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -258,7 +258,7 @@
messageJournal.appendUpdateRecord(messageID, ACKNOWLEDGE_REF, new ACKEncoding(queueID));
}
- public void storeDelete(final long messageID) throws Exception
+ public void deleteMessage(final long messageID) throws Exception
{
messageJournal.appendDeleteRecord(messageID);
}
@@ -285,7 +285,7 @@
messageJournal.appendUpdateRecord(recordID, DUPLICATE_ID, encoding);
}
- public void storeDeleteDuplicateID(long recordID) throws Exception
+ public void deleteDuplicateID(long recordID) throws Exception
{
messageJournal.appendDeleteRecord(recordID);
}
@@ -343,13 +343,19 @@
messageJournal.appendAddRecordTransactional(txID, lastPage.getRecordId(), LAST_PAGE, lastPage);
}
+
+ public void deleteLastPage(final long recordID) throws Exception
+ {
+ messageJournal.appendDeleteRecord(recordID);
+ }
+
public void storeAcknowledgeTransactional(final long txID, final long queueID, final long messageID) throws Exception
{
messageJournal.appendUpdateRecordTransactional(txID, messageID, ACKNOWLEDGE_REF, new ACKEncoding(queueID));
}
- public void storeDeletePageTransaction(final long txID, final long recordID) throws Exception
+ public void deletePageTransactional(final long txID, final long recordID) throws Exception
{
messageJournal.appendDeleteRecordTransactional(txID, recordID);
}
@@ -365,7 +371,7 @@
encoding);
}
- public void storeDeleteMessageTransactional(final long txID, final long queueID, final long messageID) throws Exception
+ public void deleteMessageTransactional(final long txID, final long queueID, final long messageID) throws Exception
{
messageJournal.appendDeleteRecordTransactional(txID, messageID, new DeleteEncoding(queueID));
}
@@ -405,7 +411,7 @@
messageJournal.appendUpdateRecordTransactional(txID, recordID, DUPLICATE_ID, encoding);
}
- public void storeDeleteDuplicateIDTransactional(long txID, long recordID) throws Exception
+ public void deleteDuplicateIDTransactional(long txID, long recordID) throws Exception
{
messageJournal.appendDeleteRecordTransactional(txID, recordID);
}
Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/nullpm/NullStorageManager.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -105,11 +105,11 @@
{
}
- public void storeDelete(final long messageID) throws Exception
+ public void deleteMessage(final long messageID) throws Exception
{
}
- public void storeDeletePageTransaction(final long txID, final long messageID) throws Exception
+ public void deletePageTransactional(final long txID, final long messageID) throws Exception
{
}
@@ -173,7 +173,6 @@
public long generateUniqueID()
{
- // FIXME - this needs to use Howard's ID generator from JBM 1.4
return idGenerator.generateID();
}
@@ -206,10 +205,14 @@
{
}
- public void storeDeleteMessageTransactional(final long txID, final long messageID, final long queueID) throws Exception
+ public void deleteLastPage(final long recordID) throws Exception
{
}
+ public void deleteMessageTransactional(final long txID, final long messageID, final long queueID) throws Exception
+ {
+ }
+
public void loadMessageJournal(final PostOffice postOffice,
final Map<Long, Queue> queues,
final ResourceManager resourceManager,
@@ -217,11 +220,11 @@
{
}
- public void storeDeleteDuplicateIDTransactional(final long txID, final long recordID) throws Exception
+ public void deleteDuplicateIDTransactional(final long txID, final long recordID) throws Exception
{
}
- public void storeDeleteDuplicateID(final long recordID) throws Exception
+ public void deleteDuplicateID(final long recordID) throws Exception
{
}
Modified: trunk/src/main/org/jboss/messaging/core/postoffice/impl/DuplicateIDCacheImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/postoffice/impl/DuplicateIDCacheImpl.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/postoffice/impl/DuplicateIDCacheImpl.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -92,7 +92,7 @@
txID = storageManager.generateUniqueID();
}
- storageManager.storeDeleteDuplicateIDTransactional(txID, id.b);
+ storageManager.deleteDuplicateIDTransactional(txID, id.b);
}
count++;
@@ -133,11 +133,11 @@
if (txID == -1)
{
- storageManager.storeDeleteDuplicateID(id.b);
+ storageManager.deleteDuplicateID(id.b);
}
else
{
- storageManager.storeDeleteDuplicateIDTransactional(txID, id.b);
+ storageManager.deleteDuplicateIDTransactional(txID, id.b);
}
id.b = recordID;
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerConsumerImpl.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -465,7 +465,7 @@
if (count == 0)
{
- storageManager.storeDelete(message.getMessageID());
+ storageManager.deleteMessage(message.getMessageID());
}
else
{
Modified: trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/src/main/org/jboss/messaging/core/transaction/impl/TransactionImpl.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -215,7 +215,7 @@
if (count == 0)
{
- storageManager.storeDeleteMessageTransactional(id, queue.getPersistenceID(), message.getMessageID());
+ storageManager.deleteMessageTransactional(id, queue.getPersistenceID(), message.getMessageID());
}
else
{
Modified: trunk/tests/src/org/jboss/messaging/tests/timing/core/server/impl/QueueImplTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/timing/core/server/impl/QueueImplTest.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/tests/src/org/jboss/messaging/tests/timing/core/server/impl/QueueImplTest.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -296,7 +296,7 @@
{
if (i % 2 == 0)
{
- storageManager.storeDeletePageTransaction(1, i);
+ storageManager.deletePageTransactional(1, i);
}
}
@@ -304,7 +304,7 @@
{
if (i % 2 == 0)
{
- storageManager.storeDeletePageTransaction(1, i);
+ storageManager.deletePageTransactional(1, i);
}
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/persistence/impl/journal/JournalStorageManagerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/persistence/impl/journal/JournalStorageManagerTest.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/persistence/impl/journal/JournalStorageManagerTest.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -117,7 +117,7 @@
messageJournal.appendDeleteRecord(messageID);
EasyMock.replay(messageJournal, bindingsJournal);
- jsm.storeDelete(messageID);
+ jsm.deleteMessage(messageID);
EasyMock.verify(messageJournal, bindingsJournal);
}
@@ -170,7 +170,7 @@
messageJournal.appendDeleteRecordTransactional(txID, messageID);
EasyMock.replay(messageJournal, bindingsJournal);
- jsm.storeDeletePageTransaction(txID, messageID);
+ jsm.deletePageTransactional(txID, messageID);
EasyMock.verify(messageJournal, bindingsJournal);
}
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueImplTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueImplTest.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/server/impl/QueueImplTest.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -769,7 +769,7 @@
{
if (i % 2 == 0)
{
- storageManager.storeDeleteMessageTransactional(1, queue.getPersistenceID(), i);
+ storageManager.deleteMessageTransactional(1, queue.getPersistenceID(), i);
}
}
@@ -777,7 +777,7 @@
{
if (i % 2 == 0)
{
- storageManager.storeDeleteMessageTransactional(1, queue.getPersistenceID(), i);
+ storageManager.deleteMessageTransactional(1, queue.getPersistenceID(), i);
}
}
@@ -1256,7 +1256,7 @@
StorageManager storageManager = EasyMock.createMock(StorageManager.class);
EasyMock.expect(storageManager.generateUniqueID()).andReturn(randomLong());
EasyMock.expect(storageManager.generateUniqueID()).andReturn(randomLong());
- storageManager.storeDeleteMessageTransactional(EasyMock.anyLong(), EasyMock.eq(queue.getPersistenceID()), EasyMock.eq(messageID));
+ storageManager.deleteMessageTransactional(EasyMock.anyLong(), EasyMock.eq(queue.getPersistenceID()), EasyMock.eq(messageID));
storageManager.commit(EasyMock.anyLong());
PostOffice postOffice = createMock(PostOffice.class);
@@ -1316,7 +1316,7 @@
StorageManager storageManager = createMock(StorageManager.class);
expect(storageManager.generateUniqueID()).andReturn(randomLong());
expect(storageManager.generateUniqueID()).andReturn(randomLong());
- storageManager.storeDeleteMessageTransactional(anyLong(), eq(queue.getPersistenceID()), eq(messageID));
+ storageManager.deleteMessageTransactional(anyLong(), eq(queue.getPersistenceID()), eq(messageID));
storageManager.commit(anyLong());
PostOffice postOffice = createMock(PostOffice.class);
@@ -1379,7 +1379,7 @@
StorageManager storageManager = EasyMock.createMock(StorageManager.class);
EasyMock.expect(storageManager.generateUniqueID()).andReturn(newMessageID);
EasyMock.expect(storageManager.generateUniqueID()).andReturn(tid);
- storageManager.storeDeleteMessageTransactional(EasyMock.anyLong(), EasyMock.eq(queue.getPersistenceID()), EasyMock.eq(messageID));
+ storageManager.deleteMessageTransactional(EasyMock.anyLong(), EasyMock.eq(queue.getPersistenceID()), EasyMock.eq(messageID));
storageManager.commit(EasyMock.anyLong());
PostOffice postOffice = EasyMock.createMock(PostOffice.class);
Modified: trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionImplTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionImplTest.java 2008-12-09 14:52:49 UTC (rev 5488)
+++ trunk/tests/src/org/jboss/messaging/tests/unit/core/transaction/impl/TransactionImplTest.java 2008-12-09 16:36:28 UTC (rev 5489)
@@ -599,7 +599,7 @@
//Expect:
sm.storeAcknowledgeTransactional(txID, queue1.getPersistenceID(), message1.getMessageID());
- sm.storeDeleteMessageTransactional(txID, queue2.getPersistenceID(), message1.getMessageID());
+ sm.deleteMessageTransactional(txID, queue2.getPersistenceID(), message1.getMessageID());
EasyMock.replay(sm, postOffice, pagingManager, pagingStore);
More information about the jboss-cvs-commits
mailing list