Examples of callMethodOnCluster()


Examples of org.jboss.as.clustering.GroupRpcDispatcher.callMethodOnCluster()

        for (int i = 0; i < viewSize - 1; i++) {
            rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.OK));
        }

        when(rpcDispatcher.getMethodCallTimeout()).thenReturn(60000l);
        when(rpcDispatcher.<RemoteLockResponse>callMethodOnCluster(eq("test"), eq("remoteLock"), eqLockParams(node1, 2000000),
                        aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES), eq(true), eq(NULL_FILTER), anyInt(), eq(false))).thenReturn(rspList);

        doThrow(new TimeoutException(node1)).when(handler).lockFromCluster(eq("test"), eq(node1), anyLong());

        when((List<Object>) rpcDispatcher.callMethodOnCluster(eq("test"), eq("releaseRemoteLock"), aryEq(new Object[] { "test", node1 }),
View Full Code Here

Examples of org.jboss.as.clustering.GroupRpcDispatcher.callMethodOnCluster()

        when(rpcDispatcher.<RemoteLockResponse>callMethodOnCluster(eq("test"), eq("remoteLock"), eqLockParams(node1, 2000000),
                        aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES), eq(true), eq(NULL_FILTER), anyInt(), eq(false))).thenReturn(rspList);

        doThrow(new TimeoutException(node1)).when(handler).lockFromCluster(eq("test"), eq(node1), anyLong());

        when((List<Object>) rpcDispatcher.callMethodOnCluster(eq("test"), eq("releaseRemoteLock"), aryEq(new Object[] { "test", node1 }),
                        aryEq(AbstractClusterLockSupport.RELEASE_REMOTE_LOCK_TYPES), eq(true))).thenReturn(new ArrayList<Object>());
       
        assertFalse(testee.lock("test", 10));
    }
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.GroupRpcDispatcher.callMethodOnCluster()

   @SuppressWarnings("unchecked")
   protected <T> List<T> callMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception
   {
      GroupRpcDispatcher dispatcher = this.partition;
      return (List<T>) dispatcher.callMethodOnCluster(this.name, methodName, args, types, true);
   }

   protected void callAsyncMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception
   {
      this.partition.callAsynchMethodOnCluster(this.name, methodName, args, types, true);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

      {
         public void run()
         {
            try
            {
               haPartition.callMethodOnCluster(getServiceHAName(),
                                               "pushDiscrepancyMap",
                                               new Object[] { arg },
                                               PUSH_DISCREPANCY_MAP_TYPES, true);
            }
            catch (Exception e)
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

      for (int i = 0; i < viewSize - 1; i++)
      {
         rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.OK));
      }
     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("remoteLock"),
                                           eqLockParams(node1, 2000000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList).atLeastOnce();
     
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

     
      handler.lockFromCluster(eq("test"), eq(node1), anyLong());
      expectLastCall().andThrow(new TimeoutException(node1)).atLeastOnce();

     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("releaseRemoteLock"),
                                           aryEq(new Object[]{"test", node1}),
                                           aryEq(AbstractClusterLockSupport.RELEASE_REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(new ArrayList<Object>()).atLeastOnce();
      replay(partition);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

      for (int i = 0; i < viewSize - 1; i++)
      {
         rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.OK));
      }
     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
     
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

      ArrayList<RemoteLockResponse> rspList = new ArrayList<RemoteLockResponse>();
      rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.OK));
      rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.REJECT, superior));
     
     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList).atLeastOnce();
     
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

      ArrayList<RemoteLockResponse> rspList = new ArrayList<RemoteLockResponse>();
      rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.OK));
      rspList.add(new RemoteLockResponse(null, RemoteLockResponse.Flag.REJECT, inferior));
     
     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("remoteLock"),
                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
View Full Code Here

Examples of org.jboss.ha.framework.interfaces.HAPartition.callMethodOnCluster()

                                           eqLockParams(node1, 200000),
                                           aryEq(AbstractClusterLockSupport.REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);

     
      expect(partition.callMethodOnCluster(eq("test"),
                                           eq("releaseRemoteLock"),
                                           aryEq(new Object[]{"test", node1}),
                                           aryEq(AbstractClusterLockSupport.RELEASE_REMOTE_LOCK_TYPES),
                                           eq(true))).andReturn(rspList);
     
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.