[jboss-cvs] JBoss Messaging SVN: r1814 - trunk/src/main/org/jboss/messaging/util
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Dec 18 17:40:15 EST 2006
Author: clebert.suconic at jboss.com
Date: 2006-12-18 17:40:14 -0500 (Mon, 18 Dec 2006)
New Revision: 1814
Modified:
trunk/src/main/org/jboss/messaging/util/Valve.java
Log:
formatting only
Modified: trunk/src/main/org/jboss/messaging/util/Valve.java
===================================================================
--- trunk/src/main/org/jboss/messaging/util/Valve.java 2006-12-18 22:38:57 UTC (rev 1813)
+++ trunk/src/main/org/jboss/messaging/util/Valve.java 2006-12-18 22:40:14 UTC (rev 1814)
@@ -64,7 +64,7 @@
Thread threadOwner;
- int refereceCountOpen=0;
+ int refereceCountOpen = 0;
public synchronized boolean isOpened()
@@ -72,7 +72,9 @@
return opened;
}
- /** If the Valve is opened, will wait until the valve is closed */
+ /**
+ * If the Valve is opened, will wait until the valve is closed
+ */
public synchronized boolean isOpened(boolean wait) throws Exception
{
if (wait && opened)
@@ -83,14 +85,12 @@
if (trace) log.trace("Waiting valve to be closed");
this.wait();
if (trace) log.trace("Valve was closed");
- }
- else
+ } else
{
if (trace) log.trace("This is ThreadOwner, so Valve won't wait");
}
return opened;
- }
- else
+ } else
{
return false;
}
@@ -104,7 +104,7 @@
public synchronized boolean open(boolean wait) throws Exception
{
- if (threadOwner==Thread.currentThread())
+ if (threadOwner == Thread.currentThread())
{
if (trace) log.trace("Valve was opened again by thread owner");
refereceCountOpen++;
@@ -144,13 +144,12 @@
log.warn("Valve was already closed", new Exception());
}
refereceCountOpen--;
- if (refereceCountOpen==0)
+ if (refereceCountOpen == 0)
{
if (trace) log.trace("Closing Valve");
closed = true;
notifyAll();
- }
- else
+ } else
{
if (trace) log.trace("Valve.close called but there referenceCountOpen=" + refereceCountOpen);
}
More information about the jboss-cvs-commits
mailing list