Examples of lockFromCluster()


Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
     
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
     
      replay(partition);
      replay(handler);
     
      assertTrue(testee.lock("test", 200000));
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
     
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());     
      expectLastCall().atLeastOnce();
     
      replay(partition);
      replay(handler);
     
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

      // When caller 1 invokes, block before giving response
      CountDownLatch answerAwaitLatch = new CountDownLatch(1);
      CountDownLatch answerStartLatch = new CountDownLatch(1);
      CountDownLatch answerDoneLatch = new CountDownLatch(1);
      BlockingAnswer<Boolean> caller1Answer = new BlockingAnswer<Boolean>(Boolean.TRUE, answerAwaitLatch, answerStartLatch, null);
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
      expectLastCall().andAnswer(caller1Answer);
     
      replay(partition);
      replay(handler);
     
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andAnswer(caller1Answer).atLeastOnce();
     
      handler.lockFromCluster(eq("test"), eq(superiorCaller), anyLong());  
     
      expect(partition.callMethodOnCluster(eq("test"),
            eq("releaseRemoteLock"),
            aryEq(new Object[]{"test", node1}),
            aryEq(AbstractClusterLockSupport.RELEASE_REMOTE_LOCK_TYPES),
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList)
     
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
     
      replay(partition);
      replay(handler);

      CountDownLatch finishedLatch = new CountDownLatch(1);
View Full Code Here

Examples of org.jboss.ha.framework.server.lock.LocalLockHandler.lockFromCluster()

                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
     
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
     
      expect(handler.getLockHolder("test")).andReturn(node1);
     
      replay(partition);
      replay(handler);
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.