From do-not-reply at jboss.org Tue Sep 13 10:44:04 2011 Content-Type: multipart/mixed; boundary="===============3492021546084192364==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r11344 - branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl. Date: Tue, 13 Sep 2011 10:44:04 -0400 Message-ID: <201109131444.p8DEi4ZX002456@svn01.web.mwc.hst.phx2.redhat.com> --===============3492021546084192364== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-09-13 10:44:04 -0400 (Tue, 13 Sep 2011) New Revision: 11344 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/PageSubscriptionImpl.java Log: clean up of locking and scheduled threads Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/h= ornetq/core/paging/cursor/impl/PageCursorProviderImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq= /core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-13 14:43:29 UT= C (rev 11343) +++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq= /core/paging/cursor/impl/PageCursorProviderImpl.java 2011-09-13 14:44:04 UT= C (rev 11344) @@ -238,6 +238,11 @@ { for (PageSubscription cursor : activeCursors.values()) { + cursor.disableAutoCleanup(); + } + + for (PageSubscription cursor : activeCursors.values()) + { cursor.stop(); } = @@ -247,7 +252,7 @@ = while (!future.await(10000)) { - log.warn("Waiting cursor provider " + this + " to finish executor= s"); + log.warn("Waiting cursor provider " + this + " to finish executor= s" + executor); } = } @@ -265,7 +270,7 @@ = while (!future.await(10000)) { - log.warn("Waiting cursor provider " + this + " to finish executor= s"); + log.warn("Waiting cursor provider " + this + " to finish executor= s " + executor); } = } @@ -463,7 +468,7 @@ * @param currentPage * @throws Exception */ - protected void storePositions(ArrayList cursorList, P= age currentPage) throws Exception + private void storePositions(ArrayList cursorList, Pag= e currentPage) throws Exception { try { @@ -500,8 +505,7 @@ = // Protected ----------------------------------------------------- = - /* Protected as we may let test cases to instrument the test */ - protected PageCacheImpl createPageCache(final long pageId) throws Excep= tion + private PageCacheImpl createPageCache(final long pageId) throws Excepti= on { return new PageCacheImpl(pagingStore.createPage((int)pageId)); } Modified: branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/h= ornetq/core/paging/cursor/impl/PageSubscriptionImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq= /core/paging/cursor/impl/PageSubscriptionImpl.java 2011-09-13 14:43:29 UTC = (rev 11343) +++ branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq= /core/paging/cursor/impl/PageSubscriptionImpl.java 2011-09-13 14:44:04 UTC = (rev 11344) @@ -59,8 +59,6 @@ * * A page cursor will always store its * @author Clebert Suconic<= /a> - * - * */ class PageSubscriptionImpl implements PageSubscription { @@ -161,11 +159,6 @@ autoCleanup =3D true; } = - public PageCursorProvider getProvider() - { - return cursorProvider; - } - public void bookmark(PagePosition position) throws Exception { PageCursorInfo cursorInfo =3D getPageInfo(position); @@ -206,6 +199,12 @@ PageSubscriptionImpl.log.warn("Error on cleaning up curs= or pages", e); } } + + @Override + public String toString() + { + return "PageSubscription.scheduleCleanupCheck()"; + } }); } } @@ -215,6 +214,8 @@ * */ public void cleanupEntries() throws Exception { + if (!autoCleanup) + return; Transaction tx =3D new TransactionImpl(store); = boolean persist =3D false; @@ -664,7 +665,7 @@ executor.execute(future); while (!future.await(1000)) { - PageSubscriptionImpl.log.warn("Waiting page cursor to finish exec= utors - " + this); + PageSubscriptionImpl.log.warn("Waiting page cursor to finish exec= utors - " + this + "\n" + executor); } } = --===============3492021546084192364==--