Examples of remoteLock()


Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

      // A call from a different caller should still work as
      // w/ supportLockOnly==false we only reject if WE hold the lock
      resetToStrict(handler);
      replay(handler);
     
      rsp = target.remoteLock("test", caller2, 1000);
     
      assertEquals(RemoteLockResponse.Flag.OK, rsp.flag);
      assertNull(rsp.holder);
     
      verify(handler);
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

      assertFalse(node1.equals(caller2));
     
      resetToStrict(handler);     
      replay(handler);
     
      RemoteLockResponse rsp = target.remoteLock("test", caller1, 1000);
     
      assertEquals(RemoteLockResponse.Flag.OK, rsp.flag);
      assertNull(rsp.holder);
     
      verify(handler);
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

     
      // A call from a different caller should work
      resetToStrict(handler);
      replay(handler);
     
      rsp = target.remoteLock("test", caller2, 1000);
     
      assertEquals(RemoteLockResponse.Flag.OK, rsp.flag);
      assertNull(rsp.holder);
     
      verify(handler);
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

      {
         t1.start();        
         assertTrue(answerStartLatch.await(500, TimeUnit.SECONDS));
         // t1 should now be blocking in caller1Answer
        
         RemoteLockResponse rsp = target.remoteLock("test", superiorCaller, 1);
         assertEquals(RemoteLockResponse.Flag.REJECT, rsp.flag);
         assertEquals(node1, rsp.holder);
        
         // release t1
         answerAwaitLatch.countDown();
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

      {
         t1.start();        
         assertTrue(answerStartLatch.await(1, TimeUnit.SECONDS));
         // t1 should now be blocking in caller1Answer
        
         RemoteLockResponse rsp = target.remoteLock("test", superiorCaller, 1);
         assertEquals(RemoteLockResponse.Flag.OK, rsp.flag);
        
         // release t1
         answerAwaitLatch.countDown();
        
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.AbstractClusterLockSupport.RpcTarget.remoteLock()

      {
         t1.start();        
         assertTrue(answerStartLatch.await(1, TimeUnit.SECONDS));
         // t1 should now be blocking in caller1Answer
        
         RemoteLockResponse rsp = target.remoteLock("test", inferiorNode, 1);
         assertEquals(RemoteLockResponse.Flag.REJECT, rsp.flag);
         assertEquals(node1, rsp.holder);
        
         // release t1
         answerAwaitLatch.countDown();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.