Author: borges
Date: 2012-03-16 11:23:12 -0400 (Fri, 16 Mar 2012)
New Revision: 12307
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java
Log:
Javadoc spelling, and other clean ups.
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageCursorProviderImpl.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -265,6 +265,7 @@
while (!future.await(10000))
{
log.warn("Waiting cursor provider " + this + " to finish
executors" + executor);
+
}
}
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PageSubscriptionImpl.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -305,24 +305,18 @@
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString()
{
return "PageSubscriptionImpl [cursorId=" + cursorId + ",
queue=" + queue + ", filter = " + filter + "]";
}
-
private PagedReference getReference(PagePosition pos) throws Exception
{
return cursorProvider.newReference(pos, cursorProvider.getMessage(pos), this);
}
- /* (non-Javadoc)
- * @see org.hornetq.core.paging.cursor.PageCursor#iterator()
- */
+ @Override
public LinkedListIterator<PagedReference> iterator()
{
return new CursorIterator();
@@ -773,7 +767,7 @@
// Private -------------------------------------------------------
- // To be called only after the ACK has been processed and guaranteed to be on storae
+ // To be called only after the ACK has been processed and guaranteed to be on storage
// The only exception is on non storage events such as not matching messages
private PageCursorInfo processACK(final PagePosition pos)
{
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/StorageManager.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -51,9 +51,9 @@
import org.hornetq.core.transaction.Transaction;
/**
- *
+ *
* A StorageManager
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert
Suconic</a>
* @author <a href="mailto:andy.taylor@jboss.org>Andy Taylor</a>
@@ -64,19 +64,19 @@
/** Get the context associated with the thread for later reuse */
OperationContext getContext();
-
+
void lineUpContext();
/** It just creates an OperationContext without associating it */
OperationContext newContext(Executor executor);
-
+
OperationContext newSingleThreadContext();
/** Set the context back to the thread */
void setContext(OperationContext context);
-
+
/**
- *
+ *
* @param ioCriticalError is the server being stopped due to an IO critical error
*/
void stop(boolean ioCriticalError) throws Exception;
@@ -91,48 +91,48 @@
void afterCompleteOperations(IOAsyncTask run);
- /** Block until the operations are done.
+ /** Block until the operations are done.
* Warning: Don't use it inside an ordered executor, otherwise the system may
lock up
* in case of the pools are full
* @throws Exception */
boolean waitOnOperations(long timeout) throws Exception;
- /** Block until the operations are done.
+ /** Block until the operations are done.
* Warning: Don't use it inside an ordered executor, otherwise the system may
lock up
* in case of the pools are full
* @throws Exception */
void waitOnOperations() throws Exception;
-
+
/**
- * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
- * otherwise the system may become irrensponsive if too many destinations are reading
all the same time.
+ * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
otherwise
+ * the system may become unresponsive if too many destinations are reading all the
same time.
* This is called before we read, so we can limit concurrent reads
* @throws Exception
*/
void beforePageRead() throws Exception;
-
+
/**
- * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
- * otherwise the system may become irrensponsive if too many destinations are reading
all the same time.
+ * We need a safeguard in place to avoid too much concurrent IO happening on Paging,
otherwise
+ * the system may become unresponsive if too many destinations are reading all the
same time.
* This is called after we read, so we can limit concurrent reads
* @throws Exception
*/
void afterPageRead() throws Exception;
-
-
+
+
/** AIO has an optimized buffer which has a method to release it
instead of the way NIO will release data based on GC.
These methods will use that buffer if the inner method supports it */
ByteBuffer allocateDirectBuffer(int size);
-
+
/** AIO has an optimized buffer which has a method to release it
instead of the way NIO will release data based on GC.
These methods will use that buffer if the inner method supports it */
void freeDirectBuffer(ByteBuffer buffer);
-
+
void clearContext();
-
+
long generateUniqueID();
long getCurrentUniqueID();
@@ -150,7 +150,7 @@
void deleteMessage(long messageID) throws Exception;
void storeAcknowledge(long queueID, long messageID) throws Exception;
-
+
void storeCursorAcknowledge(long queueID, PagePosition position) throws Exception;
void updateDeliveryCount(MessageReference ref) throws Exception;
@@ -168,7 +168,7 @@
void storeAcknowledgeTransactional(long txID, long queueID, long messageID) throws
Exception;
void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition
position) throws Exception;
-
+
void deleteCursorAcknowledgeTransactional(long txID, long ackID) throws Exception;
void updateScheduledDeliveryTimeTransactional(long txID, MessageReference ref) throws
Exception;
@@ -182,12 +182,12 @@
LargeServerMessage createLargeMessage();
/**
- *
+ *
* @param id
- * @param message This is a temporary message that holds the parsed properties.
+ * @param message This is a temporary message that holds the parsed properties.
* The remoting layer can't create a ServerMessage directly, then this will
be replaced.
* @return
- * @throws Exception
+ * @throws Exception
*/
LargeServerMessage createLargeMessage(long id, MessageInternal message) throws
Exception;
@@ -200,15 +200,15 @@
void commit(long txID, boolean lineUpContext) throws Exception;
void rollback(long txID) throws Exception;
-
+
void rollbackBindings(long txID) throws Exception;
-
+
void commitBindings(long txID) throws Exception;
void storePageTransaction(long txID, PageTransactionInfo pageTransaction) throws
Exception;
-
+
void updatePageTransaction(long txID, PageTransactionInfo pageTransaction, int
depage) throws Exception;
-
+
/** FIXME Unused */
void updatePageTransaction(PageTransactionInfo pageTransaction, int depage) throws
Exception;
@@ -238,40 +238,40 @@
void addGrouping(GroupBinding groupBinding) throws Exception;
void deleteGrouping(GroupBinding groupBinding) throws Exception;
-
+
void storeAddressSetting(PersistedAddressSetting addressSetting) throws Exception;
-
+
void deleteAddressSetting(SimpleString addressMatch) throws Exception;
-
+
List<PersistedAddressSetting> recoverAddressSettings() throws Exception;
-
+
void storeSecurityRoles(PersistedRoles persistedRoles) throws Exception;
-
+
void deleteSecurityRoles(SimpleString addressMatch) throws Exception;
List<PersistedRoles> recoverPersistedRoles() throws Exception;
-
- /**
+
+ /**
* @return The ID with the stored counter
*/
long storePageCounter(long txID, long queueID, long value) throws Exception;
-
+
void deleteIncrementRecord(long txID, long recordID) throws Exception;
-
+
void deletePageCounter(long txID, long recordID) throws Exception;
/**
* @return the ID with the increment record
- * @throws Exception
+ * @throws Exception
*/
long storePageCounterInc(long txID, long queueID, int add) throws Exception;
-
+
/**
* @return the ID with the increment record
- * @throws Exception
+ * @throws Exception
*/
long storePageCounterInc(long queueID, int add) throws Exception;
-
+
/**
* @return the bindings journal
*/
@@ -284,7 +284,7 @@
/**
* TODO: Find a way to not depend on ClusterConnection and TransportConfiguration
here
- *
+ *
* @param replicationManager
* @param pagingManager
* @param nodeID
@@ -297,9 +297,9 @@
throws Exception;
/**
- *
+ *
* TODO: RoutingContext should only be used on PostOffice
- *
+ *
* Adds message to page if we are paging.
* @return whether we added the message to a page or not.
*/
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -4218,9 +4218,7 @@
}
}
- /* (non-Javadoc)
- * @see
org.hornetq.core.transaction.TransactionOperation#getRelatedMessageReferences()
- */
+ @Override
public List<MessageReference> getRelatedMessageReferences()
{
return null;
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/OperationContextImpl.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -253,16 +253,15 @@
}
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.hornetq.core.replication.ReplicationToken#complete()
*/
public void complete()
{
}
- /* (non-Javadoc)
- * @see org.hornetq.core.asyncio.AIOCallback#onError(int, java.lang.String)
- */
+ @Override
public synchronized void onError(final int errorCode, final String errorMessage)
{
this.errorCode = errorCode;
@@ -311,17 +310,13 @@
}
}
- /* (non-Javadoc)
- * @see org.hornetq.core.persistence.OperationContext#waitCompletion()
- */
+ @Override
public void waitCompletion() throws Exception
{
waitCompletion(0);
}
- /* (non-Javadoc)
- * @see org.hornetq.core.persistence.OperationContext#waitCompletion(long)
- */
+ @Override
public boolean waitCompletion(final long timeout) throws Exception
{
SimpleWaitIOCallback waitCallback = new SimpleWaitIOCallback();
@@ -338,9 +333,6 @@
}
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString()
{
@@ -379,7 +371,4 @@
", executor=" + this.executor +
"]" + buffer.toString();
}
-
-
-
}
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java
===================================================================
---
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/SimpleWaitIOCallback.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -39,7 +39,7 @@
@Override
public String toString()
{
- return "simpleWaitIOCallback";
+ return SimpleWaitIOCallback.class.getName();
}
public void done()
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java
===================================================================
---
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java 2012-03-16
09:01:01 UTC (rev 12306)
+++
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/TimedBuffer.java 2012-03-16
15:23:12 UTC (rev 12307)
@@ -421,8 +421,8 @@
{
while (!closed)
{
- // We flush on the timer if there are pending syncs there and we've
waited waited at least one
- // timeout since the time of the last flush
+ // We flush on the timer if there are pending syncs there and we've
waited at least one
+ // timeout since the time of the last flush.
// Effectively flushing "resets" the timer
if (pendingSync && bufferObserver != null &&
System.nanoTime() > lastFlushTime.get() + timeout)