[hornetq-commits] JBoss hornetq SVN: r12174 - trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Feb 23 04:39:19 EST 2012


Author: borges
Date: 2012-02-23 04:39:18 -0500 (Thu, 23 Feb 2012)
New Revision: 12174

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PageImpl.java
Log:
finalize is protected, not public

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PageImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PageImpl.java	2012-02-23 09:39:00 UTC (rev 12173)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/impl/PageImpl.java	2012-02-23 09:39:18 UTC (rev 12174)
@@ -32,7 +32,7 @@
 import org.hornetq.utils.DataConstants;
 
 /**
- * 
+ *
  * @author <a href="mailto:clebert.suconic at jboss.com">Clebert Suconic</a>
  *
  */
@@ -41,7 +41,7 @@
    // Constants -----------------------------------------------------
 
    private static final Logger log = Logger.getLogger(PageImpl.class);
-   
+
    private static final boolean isTrace = log.isTraceEnabled();
    private static final boolean isDebug = log.isDebugEnabled();
 
@@ -62,7 +62,7 @@
    private final SequentialFile file;
 
    private final SequentialFileFactory fileFactory;
-   
+
    /**
     * The page cache that will be filled with data as we write more data
     */
@@ -99,7 +99,7 @@
    {
       return pageId;
    }
-   
+
    public void setLiveCache(LivePageCache pageCache)
    {
       this.pageCache = pageCache;
@@ -202,7 +202,7 @@
       buffer.rewind();
 
       file.writeDirect(buffer, false);
-      
+
       if (pageCache != null)
       {
          pageCache.addLiveMessage(message);
@@ -250,7 +250,7 @@
       {
          storageManager.pageDeleted(storeName, pageId);
       }
-      
+
       if (isDebug)
       {
          log.debug("Deleting pageId=" + pageId + " on store " + storeName);
@@ -263,7 +263,7 @@
             if (msg.getMessage().isLargeMessage())
             {
                LargeServerMessage lmsg = (LargeServerMessage)msg.getMessage();
-               
+
                // Remember, cannot call delete directly here
                // Because the large-message may be linked to another message
                // or it may still being delivered even though it has been acked already
@@ -286,7 +286,7 @@
          {
             file.delete();
          }
-         
+
          return true;
       }
       catch (Exception e)
@@ -305,20 +305,21 @@
    {
       return size.intValue();
    }
-   
+
    @Override
    public String toString()
    {
       return "PageImpl::pageID="  + this.pageId + ", file=" + this.file;
    }
-   
 
+
    public int compareTo(Page otherPage)
    {
       return otherPage.getPageId() - this.pageId;
    }
-   
-   public void finalize()
+
+   @Override
+   protected void finalize()
    {
       try
       {
@@ -333,10 +334,6 @@
       }
    }
 
-
-   /* (non-Javadoc)
-    * @see java.lang.Object#hashCode()
-    */
    @Override
    public int hashCode()
    {
@@ -346,16 +343,6 @@
       return result;
    }
 
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   /* (non-Javadoc)
-    * @see java.lang.Object#equals(java.lang.Object)
-    */
    @Override
    public boolean equals(Object obj)
    {



More information about the hornetq-commits mailing list