From do-not-reply at jboss.org Mon Jun 27 09:38:05 2011 Content-Type: multipart/mixed; boundary="===============0042286551683289114==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r10881 - trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl. Date: Mon, 27 Jun 2011 09:38:04 -0400 Message-ID: <201106271338.p5RDc4sG019180@svn01.web.mwc.hst.phx2.redhat.com> --===============0042286551683289114== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-06-27 09:38:04 -0400 (Mon, 27 Jun 2011) New Revision: 10881 Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeMa= nager.java Log: Document class purpose. Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InV= MNodeManager.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 --- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeM= anager.java 2011-06-27 13:37:28 UTC (rev 10880) +++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/InVMNodeM= anager.java 2011-06-27 13:38:04 UTC (rev 10881) @@ -13,25 +13,31 @@ = package org.hornetq.core.server.impl; = +import static org.hornetq.core.server.impl.InVMNodeManager.State.FAILING_B= ACK; +import static org.hornetq.core.server.impl.InVMNodeManager.State.LIVE; +import static org.hornetq.core.server.impl.InVMNodeManager.State.NOT_START= ED; +import static org.hornetq.core.server.impl.InVMNodeManager.State.PAUSED; + +import java.util.concurrent.Semaphore; + import org.hornetq.api.core.SimpleString; import org.hornetq.core.server.NodeManager; import org.hornetq.utils.UUIDGenerator; = -import java.util.concurrent.Semaphore; - -import static org.hornetq.core.server.impl.InVMNodeManager.State.*; - /** - * @author Andy Taylor - * Date: Oct 13, 2010 - * Time: 3:55:47 PM + * This is a _mock_ NodeManager and is used only in tests. + *
+ * It allows writing tests without the need to spawn a new JVM. + * = + * @author Andy Taylor Date= : Oct 13, 2010 Time: 3:55:47 + * PM */ public class InVMNodeManager extends NodeManager { = - private Semaphore liveLock; + private final Semaphore liveLock; = - private Semaphore backupLock; + private final Semaphore backupLock; = public enum State {LIVE, PAUSED, FAILING_BACK, NOT_STARTED} = @@ -119,7 +125,7 @@ @Override public boolean isAwaitingFailback() throws Exception { - return state =3D=3D FAILING_BACK; = + return state =3D=3D FAILING_BACK; } = @Override --===============0042286551683289114==--