JBoss hornetq SVN: r11330 - branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/bridge.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-09-12 12:52:08 -0400 (Mon, 12 Sep 2011)
New Revision: 11330
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
Log:
tweak on test
Modified: branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java
===================================================================
--- branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java 2011-09-12 14:10:12 UTC (rev 11329)
+++ branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/cluster/bridge/BridgeReconnectTest.java 2011-09-12 16:52:08 UTC (rev 11330)
@@ -572,6 +572,9 @@
{
server1.start();
server0.start();
+
+ waitForServerStart(server0);
+ waitForServerStart(server1);
locator = HornetQClient.createServerLocatorWithHA(server0tc, server1tc);
ClientSessionFactory csf0 = locator.createSessionFactory(server0tc);
13 years, 3 months
JBoss hornetq SVN: r11329 - branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 10:10:12 -0400 (Mon, 12 Sep 2011)
New Revision: 11329
Added:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailverOverTest.java
Log:
HORNETQ-720 Replicated paging tests.
Added: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailverOverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailverOverTest.java (rev 0)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedPagedFailverOverTest.java 2011-09-12 14:10:12 UTC (rev 11329)
@@ -0,0 +1,19 @@
+package org.hornetq.tests.integration.cluster.failover;
+
+import java.util.HashMap;
+
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.NodeManager;
+import org.hornetq.core.settings.impl.AddressSettings;
+
+public class ReplicatedPagedFailverOverTest extends ReplicatedFailoverTest
+{
+ @Override
+ protected HornetQServer createInVMFailoverServer(final boolean realFiles, final Configuration configuration,
+ final NodeManager nodeManager)
+ {
+ return createInVMFailoverServer(realFiles, configuration, PAGE_SIZE, PAGE_MAX,
+ new HashMap<String, AddressSettings>(), nodeManager);
+ }
+}
13 years, 3 months
JBoss hornetq SVN: r11328 - in branches/HORNETQ-720_Replication: hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal and 2 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 10:09:34 -0400 (Mon, 12 Sep 2011)
New Revision: 11328
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
Log:
Reduce visibility and other clean-ups
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2011-09-12 14:09:34 UTC (rev 11328)
@@ -159,14 +159,11 @@
void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int depage) throws Exception;
+ /** FIXME Unused */
void updatePageTransaction(PageTransactionInfo pageTransaction, int depage) throws Exception;
void deletePageTransactional(long recordID) throws Exception;
- /** This method is only useful at the backup side. We only load internal structures making the journals ready for
- * append mode on the backup side. */
- JournalLoadInformation[] loadInternalOnly() throws Exception;
-
JournalLoadInformation loadMessageJournal(final PostOffice postOffice,
final PagingManager pagingManager,
final ResourceManager resourceManager,
@@ -186,7 +183,7 @@
JournalLoadInformation loadBindingJournal(List<QueueBindingInfo> queueBindingInfos, List<GroupingInfo> groupingInfos) throws Exception;
- // grouping relateed operations
+ // grouping related operations
void addGrouping(GroupBinding groupBinding) throws Exception;
void deleteGrouping(GroupBinding groupBinding) throws Exception;
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-09-12 14:09:34 UTC (rev 11328)
@@ -117,43 +117,43 @@
private static final long CHECKPOINT_BATCH_SIZE = Integer.MAX_VALUE;
// grouping journal record type
- public static final byte GROUP_RECORD = 20;
+ private static final byte GROUP_RECORD = 20;
// Bindings journal record type
- public static final byte QUEUE_BINDING_RECORD = 21;
+ private static final byte QUEUE_BINDING_RECORD = 21;
public static final byte ID_COUNTER_RECORD = 24;
- public static final byte ADDRESS_SETTING_RECORD = 25;
+ private static final byte ADDRESS_SETTING_RECORD = 25;
- public static final byte SECURITY_RECORD = 26;
+ private static final byte SECURITY_RECORD = 26;
// Message journal record types
- public static final byte ADD_LARGE_MESSAGE = 30;
+ private static final byte ADD_LARGE_MESSAGE = 30;
- public static final byte ADD_MESSAGE = 31;
+ private static final byte ADD_MESSAGE = 31;
- public static final byte ADD_REF = 32;
+ private static final byte ADD_REF = 32;
- public static final byte ACKNOWLEDGE_REF = 33;
+ private static final byte ACKNOWLEDGE_REF = 33;
public static final byte UPDATE_DELIVERY_COUNT = 34;
public static final byte PAGE_TRANSACTION = 35;
- public static final byte SET_SCHEDULED_DELIVERY_TIME = 36;
+ private static final byte SET_SCHEDULED_DELIVERY_TIME = 36;
- public static final byte DUPLICATE_ID = 37;
+ private static final byte DUPLICATE_ID = 37;
- public static final byte HEURISTIC_COMPLETION = 38;
+ private static final byte HEURISTIC_COMPLETION = 38;
public static final byte ACKNOWLEDGE_CURSOR = 39;
- public static final byte PAGE_CURSOR_COUNTER_VALUE = 40;
+ private static final byte PAGE_CURSOR_COUNTER_VALUE = 40;
- public static final byte PAGE_CURSOR_COUNTER_INC = 41;
+ private static final byte PAGE_CURSOR_COUNTER_INC = 41;
private final BatchingIDGenerator idGenerator;
private final ReentrantReadWriteLock storageManagerLock = new ReentrantReadWriteLock(true);
@@ -604,11 +604,6 @@
OperationContextImpl.setContext(context);
}
- public Executor getSingleThreadExecutor()
- {
- return singleThreadExecutor;
- }
-
public OperationContext newSingleThreadContext()
{
return newContext(singleThreadExecutor);
@@ -644,7 +639,7 @@
return new LargeServerMessageImpl(this);
}
- protected void addBytesToLargeMessage(final SequentialFile file, final long messageId, final byte[] bytes)
+ protected final void addBytesToLargeMessage(final SequentialFile file, final long messageId, final byte[] bytes)
throws Exception
{
readLock();
@@ -1922,7 +1917,7 @@
}
}
- public static void describeBindingJournal(final String bindingsDir) throws Exception
+ static void describeBindingJournal(final String bindingsDir) throws Exception
{
SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir);
@@ -1932,7 +1927,7 @@
describeJournal(bindingsFF, bindings);
}
- public static void describeMessagesJournal(final String messagesDir) throws Exception
+ static void describeMessagesJournal(final String messagesDir) throws Exception
{
SequentialFileFactory messagesFF = new NIOSequentialFileFactory(messagesDir);
@@ -2079,9 +2074,6 @@
return started;
}
- /* (non-Javadoc)
- * @see org.hornetq.core.persistence.StorageManager#loadInternalOnly()
- */
public JournalLoadInformation[] loadInternalOnly() throws Exception
{
readLock();
@@ -2517,7 +2509,7 @@
// Inner Classes
// ----------------------------------------------------------------------------
- static class DummyOperationContext implements OperationContext
+ private final static class DummyOperationContext implements OperationContext
{
private static DummyOperationContext instance = new DummyOperationContext();
@@ -2528,13 +2520,6 @@
}
/* (non-Javadoc)
- * @see org.hornetq.core.persistence.OperationContext#complete()
- */
- public void complete()
- {
- }
-
- /* (non-Javadoc)
* @see org.hornetq.core.persistence.OperationContext#executeOnCompletion(org.hornetq.core.journal.IOAsyncTask)
*/
public void executeOnCompletion(final IOAsyncTask runnable)
@@ -3670,7 +3655,7 @@
* @param buffer
* @return
*/
- protected static GroupingEncoding newGroupEncoding(long id, HornetQBuffer buffer)
+ private static GroupingEncoding newGroupEncoding(long id, HornetQBuffer buffer)
{
GroupingEncoding encoding = new GroupingEncoding();
encoding.decode(buffer);
@@ -3683,7 +3668,7 @@
* @param buffer
* @return
*/
- protected static PersistentQueueBindingEncoding newBindingEncoding(long id, HornetQBuffer buffer)
+ private static PersistentQueueBindingEncoding newBindingEncoding(long id, HornetQBuffer buffer)
{
PersistentQueueBindingEncoding bindingEncoding = new PersistentQueueBindingEncoding();
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2011-09-12 14:09:34 UTC (rev 11328)
@@ -174,12 +174,10 @@
}
else if (type == PacketImpl.REPLICATION_PAGE_WRITE)
{
- System.out.println("PAGE_WRITE");
handlePageWrite((ReplicationPageWriteMessage)packet);
}
else if (type == PacketImpl.REPLICATION_PAGE_EVENT)
{
- System.out.println("PAGE_EVENT");
handlePageEvent((ReplicationPageEventMessage)packet);
}
else if (type == PacketImpl.REPLICATION_LARGE_MESSAGE_BEGIN)
Modified: branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFile.java 2011-09-12 14:09:34 UTC (rev 11328)
@@ -36,7 +36,7 @@
*
*
*/
-public abstract class AbstractSequentialFile implements SequentialFile
+abstract class AbstractSequentialFile implements SequentialFile
{
// Constants -----------------------------------------------------
Modified: branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java 2011-09-12 13:38:15 UTC (rev 11327)
+++ branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/AbstractSequentialFileFactory.java 2011-09-12 14:09:34 UTC (rev 11328)
@@ -38,7 +38,7 @@
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
*
*/
-public abstract class AbstractSequentialFileFactory implements SequentialFileFactory
+abstract class AbstractSequentialFileFactory implements SequentialFileFactory
{
// Timeout used to wait executors to shutdown
@@ -61,7 +61,7 @@
* */
protected ExecutorService writeExecutor;
- public AbstractSequentialFileFactory(final String journalDir,
+ AbstractSequentialFileFactory(final String journalDir,
final boolean buffered,
final int bufferSize,
final int bufferTimeout,
13 years, 3 months
JBoss hornetq SVN: r11327 - in trunk/hornetq-core/src/main/java/org/hornetq: core/server/impl and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:38:15 -0400 (Mon, 12 Sep 2011)
New Revision: 11327
Removed:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/Delivery.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/DeliveryImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/utils/HQDeque.java
trunk/hornetq-core/src/main/java/org/hornetq/utils/HQIterator.java
Log:
Delete 'dead' unused code.
Deleted: trunk/hornetq-core/src/main/java/org/hornetq/core/server/Delivery.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/Delivery.java 2011-09-12 13:33:49 UTC (rev 11326)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/Delivery.java 2011-09-12 13:38:15 UTC (rev 11327)
@@ -1,28 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.core.server;
-
-/**
- *
- * A Delivery
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- */
-public interface Delivery
-{
- MessageReference getReference();
-
- long getConsumerID();
-}
Deleted: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/DeliveryImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/DeliveryImpl.java 2011-09-12 13:33:49 UTC (rev 11326)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/DeliveryImpl.java 2011-09-12 13:38:15 UTC (rev 11327)
@@ -1,47 +0,0 @@
-/*
- * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.core.server.impl;
-
-import org.hornetq.core.server.Delivery;
-import org.hornetq.core.server.MessageReference;
-
-/**
- *
- * A DeliveryImpl
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- */
-public class DeliveryImpl implements Delivery
-{
- private final long consumerID;
-
- private final MessageReference reference;
-
- public DeliveryImpl(final long consumerID, final MessageReference reference)
- {
- this.consumerID = consumerID;
- this.reference = reference;
- }
-
- public long getConsumerID()
- {
- return consumerID;
- }
-
- public MessageReference getReference()
- {
- return reference;
- }
-}
Deleted: trunk/hornetq-core/src/main/java/org/hornetq/utils/HQDeque.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/HQDeque.java 2011-09-12 13:33:49 UTC (rev 11326)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/HQDeque.java 2011-09-12 13:38:15 UTC (rev 11327)
@@ -1,39 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.utils;
-
-
-/**
- * A HQDeque
- *
- * @author Tim Fox
- *
- *
- */
-public interface HQDeque<T>
-{
- void addFirst(T t);
-
- void addLast(T t);
-
- HQIterator<T> iterator();
-
- boolean isEmpty();
-
- T removeFirst();
-
- T getFirst();
-
- void clear();
-}
Deleted: trunk/hornetq-core/src/main/java/org/hornetq/utils/HQIterator.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/HQIterator.java 2011-09-12 13:33:49 UTC (rev 11326)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/HQIterator.java 2011-09-12 13:38:15 UTC (rev 11327)
@@ -1,30 +0,0 @@
-/*
- * Copyright 2010 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.hornetq.utils;
-
-/**
- * A HQIterator
- *
- * @author Tim Fox
- *
- *
- */
-public interface HQIterator<E>
-{
- E next();
-
- void remove();
-
- void prev();
-}
13 years, 3 months
JBoss hornetq SVN: r11326 - in branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq: core/paging/cursor/impl and 2 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:33:49 -0400 (Mon, 12 Sep 2011)
New Revision: 11326
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/OrderedExecutorFactory.java
Log:
HORNETQ-720 Fix dead-lock on PagingStore shutdown, remove dead code, reduce visibility
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -95,12 +95,10 @@
*/
Page depage() throws Exception;
-
void forceAnotherPage() throws Exception;
Page getCurrentPage();
-
/** @return true if paging was started, or false if paging was already started before this call */
boolean startPaging() throws Exception;
@@ -110,20 +108,19 @@
void executeRunnableWhenMemoryAvailable(Runnable runnable);
- /** This method will hold and producer, but it wait operations to finish before locking (write lock) */
- void lock();
+ /**
+ * Write lock the PagingStore.
+ * @param timeout milliseconds to wait for the lock. If value is {@literal -1} then wait
+ * indefinitely.
+ * @return {@code true} if the lock was obtained, {@code false} otherwise
+ */
+ boolean lock(long timeout);
/**
- *
- * Call this method using the same thread used by the last call of {@link PagingStore#lock()}
- *
+ * Call this method using the same thread used by the last call of {@link PagingStore#lock()}.
*/
void unlock();
- /** This is used mostly by tests.
- * We will wait any pending runnable to finish its execution */
- void flushExecutors();
-
/**
* Files to synchronize with backup.
* @return
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -36,7 +36,7 @@
/**
* A PageProviderIMpl
- *
+ *
* TODO: this may be moved entirely into PagingStore as there's an one-to-one relationship here
* However I want to keep this isolated as much as possible during development
*
@@ -302,6 +302,12 @@
storageManager.clearContext();
}
}
+
+ @Override
+ public String toString()
+ {
+ return "PageCursorProvider:scheduleCleanup()";
+ }
});
}
@@ -309,8 +315,15 @@
{
ArrayList<Page> depagedPages = new ArrayList<Page>();
- pagingStore.lock();
-
+ while (true)
+ {
+ if (pagingStore.lock(100))
+ {
+ break;
+ }
+ if (!pagingStore.isStarted())
+ return;
+ }
synchronized (this)
{
try
@@ -342,7 +355,6 @@
break;
}
}
-
if (complete)
{
@@ -378,6 +390,7 @@
if (pagingStore.getNumberOfPages() == 0 || pagingStore.getNumberOfPages() == 1 &&
pagingStore.getCurrentPage().getNumberOfMessages() == 0)
{
+
pagingStore.stopPaging();
}
else
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -57,12 +57,12 @@
/**
* A PageCursorImpl
*
- * A page cursor will always store its
+ * A page cursor will always store its
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
*
- *
+ *
*/
-public class PageSubscriptionImpl implements PageSubscription
+class PageSubscriptionImpl implements PageSubscription
{
// Constants -----------------------------------------------------
private static final Logger log = Logger.getLogger(PageSubscriptionImpl.class);
@@ -99,7 +99,7 @@
private final SortedMap<Long, PageCursorInfo> consumedPages = Collections.synchronizedSortedMap(new TreeMap<Long, PageCursorInfo>());
private final PageSubscriptionCounter counter;
-
+
private final Executor executor;
private final AtomicLong deliveredCount = new AtomicLong(0);
@@ -210,7 +210,7 @@
}
}
- /**
+ /**
* It will cleanup all the records for completed pages
* */
public void cleanupEntries() throws Exception
@@ -224,7 +224,7 @@
// First get the completed pages using a lock
synchronized (this)
{
- for (Entry<Long, PageCursorInfo> entry : consumedPages.entrySet())
+ for (Entry<Long, PageCursorInfo> entry : consumedPages.entrySet())
{
PageCursorInfo info = entry.getValue();
if (info.isDone() && !info.isPendingDelete() && lastAckedPosition != null)
@@ -363,7 +363,7 @@
}
/**
- *
+ *
*/
private synchronized PagePosition getStartPosition()
{
@@ -395,7 +395,7 @@
}
}
- if (isTrace)
+ if (isTrace)
{
trace("Returning initial position " + retValue);
}
@@ -520,7 +520,7 @@
}
}
- /**
+ /**
* Theres no need to synchronize this method as it's only called from journal load on startup
*/
public void reloadACK(final PagePosition position)
@@ -550,7 +550,7 @@
processACK(position);
}
-
+
public void lateDeliveryRollback(PagePosition position)
{
PageCursorInfo cursorInfo = processACK(position);
@@ -574,9 +574,9 @@
final long tx = store.generateUniqueID();
try
{
-
+
boolean isPersistent = false;
-
+
synchronized (PageSubscriptionImpl.this)
{
for (PageCursorInfo cursor : consumedPages.values())
@@ -591,12 +591,12 @@
}
}
}
-
+
if (isPersistent)
{
store.commit(tx);
}
-
+
cursorProvider.close(this);
}
catch (Exception e)
@@ -678,7 +678,7 @@
printDebug(toString());
}
- public void printDebug(final String msg)
+ private void printDebug(final String msg)
{
System.out.println("Debug information on PageCurorImpl- " + msg);
for (PageCursorInfo info : consumedPages.values())
@@ -752,7 +752,7 @@
{
log.trace("Scheduling cleanup on pageSubscription for address = " + pageStore.getAddress() + " queue = " + this.getQueue().getName());
}
-
+
// there's a different page being acked, we will do the check right away
if (autoCleanup)
{
@@ -764,7 +764,7 @@
PageCursorInfo info = getPageInfo(pos);
info.addACK(pos);
-
+
return info;
}
@@ -821,7 +821,7 @@
// Inner classes -------------------------------------------------
- /**
+ /**
* This will hold information about the pending ACKs towards a page.
* This instance will be released as soon as the entire page is consumed, releasing the memory at that point
* The ref counts are increased also when a message is ignored for any reason.
@@ -839,13 +839,13 @@
private WeakReference<PageCache> cache;
- private Set<PagePosition> removedReferences = new ConcurrentHashSet<PagePosition>();
+ private final Set<PagePosition> removedReferences = new ConcurrentHashSet<PagePosition>();
// The page was live at the time of the creation
private final boolean wasLive;
// There's a pending TX to add elements on this page
- private AtomicInteger pendingTX = new AtomicInteger(0);
+ private final AtomicInteger pendingTX = new AtomicInteger(0);
// There's a pending delete on the async IO pipe
// We're holding this object to avoid delete the pages before the IO is complete,
@@ -946,7 +946,7 @@
}
/**
- *
+ *
*/
protected void checkDone()
{
@@ -1021,6 +1021,7 @@
/* (non-Javadoc)
* @see org.hornetq.core.transaction.TransactionOperation#getRelatedMessageReferences()
*/
+ @Override
public List<MessageReference> getRelatedMessageReferences()
{
return Collections.emptyList();
@@ -1153,9 +1154,9 @@
{
ignored = true;
}
-
+
PageCursorInfo info = getPageInfo(message.getPosition(), false);
-
+
if (info != null && info.isRemoved(message.getPosition()))
{
continue;
@@ -1191,7 +1192,7 @@
// Say you have a Browser that will only read the files... there's no need to control PageCursors is
// nothing
// is being changed. That's why the false is passed as a parameter here
-
+
if (info != null && info.isRemoved(message.getPosition()))
{
valid = false;
@@ -1228,7 +1229,7 @@
}
}
- /** QueueImpl::deliver could be calling hasNext while QueueImpl.depage could be using next and hasNext as well.
+ /** QueueImpl::deliver could be calling hasNext while QueueImpl.depage could be using next and hasNext as well.
* It would be a rare race condition but I would prefer avoiding that scenario */
public synchronized boolean hasNext()
{
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingManagerImpl.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -302,7 +302,7 @@
syncLock.writeLock().lock();
for (PagingStore store : stores.values())
{
- store.lock();
+ store.lock(-1);
}
}
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -24,6 +24,7 @@
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReadWriteLock;
@@ -224,9 +225,21 @@
// PagingStore implementation ------------------------------------
- public void lock()
+ public boolean lock(long timeout)
{
- lock.writeLock().lock();
+ if (timeout == -1)
+ {
+ lock.writeLock().lock();
+ return true;
+ }
+ try
+ {
+ return lock.writeLock().tryLock(timeout, TimeUnit.MILLISECONDS);
+ }
+ catch (InterruptedException e)
+ {
+ return false;
+ }
}
public void unlock()
@@ -373,7 +386,7 @@
public synchronized void stop() throws Exception
{
- lock();
+ lock(-1);
try
{
if (running)
@@ -397,6 +410,7 @@
}
}
+ /** Wait any pending runnable to finish its execution. */
public void flushExecutors()
{
cursorProvider.flushExecutors();
@@ -571,7 +585,7 @@
public Page createPage(final int pageNumber) throws Exception
{
- lock();
+ lock(-1);
try
{
String fileName = createFileName(pageNumber);
@@ -1131,7 +1145,7 @@
@Override
public void sendPages(ReplicationManager replicator, Collection<Integer> pageIds) throws Exception
{
- lock();
+ lock(-1);
try
{
for (Integer id : pageIds)
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/OrderedExecutorFactory.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/OrderedExecutorFactory.java 2011-09-12 13:33:04 UTC (rev 11325)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/OrderedExecutorFactory.java 2011-09-12 13:33:49 UTC (rev 11326)
@@ -23,9 +23,9 @@
*
* @author <a href="david.lloyd(a)jboss.com">David Lloyd</a>
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
+ *
* @version <tt>$Revision$</tt>
- *
+ *
*/
public final class OrderedExecutorFactory implements ExecutorFactory
{
@@ -125,5 +125,10 @@
}
}
}
+
+ public String toString()
+ {
+ return "OrderedExecutor(running=" + running + ", tasks=" + tasks + ")";
+ }
}
}
13 years, 3 months
JBoss hornetq SVN: r11325 - branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:33:04 -0400 (Mon, 12 Sep 2011)
New Revision: 11325
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
Log:
remove dead code
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-09-12 13:32:26 UTC (rev 11324)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-09-12 13:33:04 UTC (rev 11325)
@@ -84,13 +84,6 @@
{
}
- abstract class BaseListener implements SessionFailureListener
- {
- public void beforeReconnect(final HornetQException me)
- {
- }
- }
-
@Override
protected void setUp() throws Exception
{
13 years, 3 months
JBoss hornetq SVN: r11324 - in branches/HORNETQ-720_Replication: hornetq-core/src/main/java/org/hornetq/core/paging/impl and 6 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:32:26 -0400 (Mon, 12 Sep 2011)
New Revision: 11324
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingTest.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/paging/PagingCounterTest.java
branches/HORNETQ-720_Replication/tests/stress-tests/src/test/java/org/hornetq/tests/stress/paging/PageCursorStressTest.java
Log:
Change PagingStore.getCursorProvier --> getCursorProvi_d_er
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/PagingStore.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -80,7 +80,7 @@
PagingManager getPagingManager();
- PageCursorProvider getCursorProvier();
+ PageCursorProvider getCursorProvider();
void processReload() throws Exception;
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -234,7 +234,7 @@
lock.writeLock().unlock();
}
- public PageCursorProvider getCursorProvier()
+ public PageCursorProvider getCursorProvider()
{
return cursorProvider;
}
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -1747,7 +1747,7 @@
{
SimpleString address = queueInfo.getAddress();
PagingStore store = pagingManager.getPageStore(address);
- subs = store.getCursorProvier().getSubscription(queueID);
+ subs = store.getCursorProvider().getSubscription(queueID);
pageSubscriptions.put(queueID, subs);
}
}
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -174,10 +174,12 @@
}
else if (type == PacketImpl.REPLICATION_PAGE_WRITE)
{
+ System.out.println("PAGE_WRITE");
handlePageWrite((ReplicationPageWriteMessage)packet);
}
else if (type == PacketImpl.REPLICATION_PAGE_EVENT)
{
+ System.out.println("PAGE_EVENT");
handlePageEvent((ReplicationPageEventMessage)packet);
}
else if (type == PacketImpl.REPLICATION_LARGE_MESSAGE_BEGIN)
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -1658,7 +1658,7 @@
Filter filter = FilterImpl.createFilter(queueBindingInfo.getFilterString());
- PageSubscription subscription = pagingManager.getPageStore(queueBindingInfo.getAddress()).getCursorProvier().createSubscription(queueBindingInfo.getId(), filter, true);
+ PageSubscription subscription = pagingManager.getPageStore(queueBindingInfo.getAddress()).getCursorProvider().createSubscription(queueBindingInfo.getId(), filter, true);
Queue queue = queueFactory.createQueue(queueBindingInfo.getId(),
queueBindingInfo.getAddress(),
@@ -1772,7 +1772,7 @@
}
else
{
- pageSubscription = pagingManager.getPageStore(address).getCursorProvier().createSubscription(queueID, filter, durable);
+ pageSubscription = pagingManager.getPageStore(address).getCursorProvider().createSubscription(queueID, filter, durable);
}
final Queue queue = queueFactory.createQueue(queueID,
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingTest.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/PagingTest.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -787,7 +787,7 @@
session.commit();
PagingStore store = server.getPagingManager().getPageStore(ADDRESS);
- store.getCursorProvier().cleanup();
+ store.getCursorProvider().cleanup();
long timeout = System.currentTimeMillis() + 5000;
while (store.isPaging() && timeout > System.currentTimeMillis())
@@ -3381,7 +3381,7 @@
}
PagingStore store = server.getPagingManager().getPageStore(ADDRESS);
- store.getCursorProvier().cleanup();
+ store.getCursorProvider().cleanup();
long timeout = System.currentTimeMillis() + 5000;
while (store.isPaging() && timeout > System.currentTimeMillis())
@@ -3499,7 +3499,7 @@
}
PagingStore store = server.getPagingManager().getPageStore(ADDRESS);
- store.getCursorProvier().cleanup();
+ store.getCursorProvider().cleanup();
long timeout = System.currentTimeMillis() + 5000;
while (store.isPaging() && timeout > System.currentTimeMillis())
@@ -3507,7 +3507,7 @@
Thread.sleep(100);
}
- store.getCursorProvier().cleanup();
+ store.getCursorProvider().cleanup();
Thread.sleep(1000);
@@ -3711,9 +3711,9 @@
pgStoreAddress = server.getPagingManager().getPageStore(ADDRESS);
- pgStoreAddress.getCursorProvier().getSubscription(server.locateQueue(ADDRESS).getID()).cleanupEntries();
+ pgStoreAddress.getCursorProvider().getSubscription(server.locateQueue(ADDRESS).getID()).cleanupEntries();
- pgStoreAddress.getCursorProvier().cleanup();
+ pgStoreAddress.getCursorProvider().cleanup();
while (timeout > System.currentTimeMillis() && pgStoreAddress.isPaging())
{
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/paging/PagingCounterTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/paging/PagingCounterTest.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/paging/PagingCounterTest.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -257,7 +257,7 @@
{
PageSubscription subscription = server.getPagingManager()
.getPageStore(new SimpleString("A1"))
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
PageSubscriptionCounter counter = subscription.getCounter();
Modified: branches/HORNETQ-720_Replication/tests/stress-tests/src/test/java/org/hornetq/tests/stress/paging/PageCursorStressTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/stress-tests/src/test/java/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-09-12 13:30:42 UTC (rev 11323)
+++ branches/HORNETQ-720_Replication/tests/stress-tests/src/test/java/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-09-12 13:32:26 UTC (rev 11324)
@@ -119,7 +119,7 @@
final int NUM_MESSAGES = 100;
- PageSubscription cursor = lookupPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ PageSubscription cursor = lookupPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
Iterator<PagedReference> iterEmpty = cursor.iterator();
@@ -278,7 +278,7 @@
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
PageCache firstPage = cursorProvider.getPageCache(new PagePositionImpl(server.getPagingManager()
@@ -319,7 +319,7 @@
server.start();
- cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
iterator = cursor.iterator();
@@ -359,12 +359,12 @@
System.out.println("Number of pages = " + numberOfPages);
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
System.out.println("Cursor: " + cursor);
@@ -387,7 +387,7 @@
server.start();
- cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
iterator = cursor.iterator();
for (int i = 10; i <= 20; i++)
@@ -419,12 +419,12 @@
System.out.println("Number of pages = " + numberOfPages);
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
System.out.println("Cursor: " + cursor);
@@ -451,7 +451,7 @@
server.start();
- cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
tx = new TransactionImpl(server.getStorageManager(), 60 * 1000);
iterator = cursor.iterator();
@@ -489,12 +489,12 @@
final int messageSize = 1024 * 1024;
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
System.out.println("Cursor: " + cursor);
@@ -532,7 +532,7 @@
pageStore = lookupPageStore(ADDRESS);
- cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
iterator = cursor.iterator();
for (int i = 0; i < NUM_MESSAGES * 2; i++)
@@ -564,7 +564,7 @@
pageStore = lookupPageStore(ADDRESS);
- cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier().getSubscription(queue.getID());
+ cursor = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider().getSubscription(queue.getID());
iterator = cursor.iterator();
for (int i = 0; i < NUM_MESSAGES * 3; i++)
@@ -632,12 +632,12 @@
final int messageSize = 1024;
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
System.out.println("Cursor: " + cursor);
@@ -773,12 +773,12 @@
final int messageSize = 100 * 1024;
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
LinkedListIterator<PagedReference> iterator = cursor.iterator();
@@ -857,12 +857,12 @@
final int messageSize = 100 * 1024;
- PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvier();
+ PageCursorProvider cursorProvider = this.server.getPagingManager().getPageStore(ADDRESS).getCursorProvider();
System.out.println("cursorProvider = " + cursorProvider);
PageSubscription cursor = this.server.getPagingManager()
.getPageStore(ADDRESS)
- .getCursorProvier()
+ .getCursorProvider()
.getSubscription(queue.getID());
LinkedListIterator<PagedReference> iterator = cursor.iterator();
@@ -1188,7 +1188,7 @@
*/
private PageCursorProvider lookupCursorProvider() throws Exception
{
- return lookupPageStore(ADDRESS).getCursorProvier();
+ return lookupPageStore(ADDRESS).getCursorProvider();
}
/**
13 years, 3 months
JBoss hornetq SVN: r11323 - branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:30:42 -0400 (Mon, 12 Sep 2011)
New Revision: 11323
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/PriorityLinkedListImpl.java
Log:
Unused field.
Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/PriorityLinkedListImpl.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/PriorityLinkedListImpl.java 2011-09-12 13:30:10 UTC (rev 11322)
+++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/PriorityLinkedListImpl.java 2011-09-12 13:30:42 UTC (rev 11323)
@@ -35,8 +35,6 @@
protected LinkedListImpl<T>[] levels;
- protected final int priorities;
-
private int size;
private int lastReset;
@@ -45,8 +43,6 @@
public PriorityLinkedListImpl(final int priorities)
{
- this.priorities = priorities;
-
levels = (LinkedListImpl<T>[])Array.newInstance(LinkedListImpl.class, priorities);
for (int i = 0; i < priorities; i++)
13 years, 3 months
JBoss hornetq SVN: r11322 - branches/HORNETQ-720_Replication/hornetq-commons/src/main/java/org/hornetq/api/core.
by do-not-reply@jboss.org
Author: borges
Date: 2011-09-12 09:30:10 -0400 (Mon, 12 Sep 2011)
New Revision: 11322
Modified:
branches/HORNETQ-720_Replication/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java
Log:
Past tense of occur is "occurred"
Modified: branches/HORNETQ-720_Replication/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java
===================================================================
--- branches/HORNETQ-720_Replication/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java 2011-09-12 12:20:07 UTC (rev 11321)
+++ branches/HORNETQ-720_Replication/hornetq-commons/src/main/java/org/hornetq/api/core/HornetQException.java 2011-09-12 13:30:10 UTC (rev 11322)
@@ -14,9 +14,9 @@
package org.hornetq.api.core;
/**
- *
- * HornetQException is the root exception for HornetQ API.
- *
+ *
+ * HornetQException is the root exception for HornetQ API.
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
@@ -57,7 +57,7 @@
public static final int UNBLOCKED = 005;
/**
- * Unexpected I/O error occured on the server.
+ * Unexpected I/O error occurred on the server.
*/
public static final int IO_ERROR = 006;
@@ -83,13 +83,13 @@
public static final int INVALID_FILTER_EXPRESSION = 103;
/**
- * A HornetQ resource is not in a legal state (e.g. calling
+ * A HornetQ resource is not in a legal state (e.g. calling
* ClientConsumer.receive() if a MessageHandler is set)
*/
public static final int ILLEGAL_STATE = 104;
/**
- * A security problem occured (authentication issues, permission issues,...)
+ * A security problem occurred (authentication issues, permission issues,...)
*/
public static final int SECURITY_EXCEPTION = 105;
@@ -128,17 +128,17 @@
* server is starting and has not finish to be initialized)
*/
public static final int SESSION_CREATION_REJECTED = 112;
-
+
/**
* A DuplicateID was rejected.
*/
public static final int DUPLICATE_ID_REJECTED = 113;
-
+
// Native Error codes ----------------------------------------------
/**
- * A internal error occured in the AIO native code
+ * A internal error occurred in the AIO native code
*/
public static final int NATIVE_ERROR_INTERNAL = 200;
@@ -168,12 +168,12 @@
public static final int NATIVE_ERROR_CANT_OPEN_CLOSE_FILE = 205;
/**
- * An error occured while allocating a queue in AIO native code
+ * An error occurred while allocating a queue in AIO native code
*/
public static final int NATIVE_ERROR_CANT_ALLOCATE_QUEUE = 206;
/**
- * An error occured while pre-allocating a file in AIO native code
+ * An error occurred while pre-allocating a file in AIO native code
*/
public static final int NATIVE_ERROR_PREALLOCATE_FILE = 208;
13 years, 3 months
JBoss hornetq SVN: r11321 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-09-12 08:20:07 -0400 (Mon, 12 Sep 2011)
New Revision: 11321
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
fixing test
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-09-12 03:34:46 UTC (rev 11320)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2011-09-12 12:20:07 UTC (rev 11321)
@@ -469,7 +469,7 @@
return server;
}
- public synchronized Map<String, String> getNodes()
+ public Map<String, String> getNodes()
{
synchronized (records)
{
13 years, 3 months