Inheritance: TBase
コード例 #1
0
        protected void StopMemberAndWait(IHazelcastInstance client, RemoteController.Client remoteController,
                                         Cluster cluster, Member member)
        {
            var resetEvent = new ManualResetEventSlim();
            var regId      = client.GetCluster().AddMembershipListener(new MembershipListener
            {
                OnMemberRemoved = @event => resetEvent.Set()
            });

            StopMember(remoteController, cluster, member);
            Assert.IsTrue(resetEvent.Wait(120 * 1000), "The member did not get removed in 120 seconds");
            Assert.IsTrue(client.GetCluster().RemoveMembershipListener(regId));
        }
コード例 #2
0
 protected virtual void SuspendMember(RemoteController.Client remoteController, Cluster cluster, Member member)
 {
     remoteController.suspendMember(cluster.Id, member.Uuid);
 }
コード例 #3
0
 protected virtual void ResumeMember(RemoteController.Client remoteController, Cluster cluster, Member member)
 {
     remoteController.resumeMember(cluster.Id, member.Uuid);
 }
コード例 #4
0
 protected virtual void StopMember(RemoteController.Client remoteController, Cluster cluster, Member member)
 {
     _logger.Info("Shutting down  member " + member.Uuid);
     remoteController.shutdownMember(cluster.Id, member.Uuid);
 }
コード例 #5
0
 protected virtual void SuspendMember(RemoteController.Client remoteController,  Cluster cluster, Member member)
 {
     remoteController.suspendMember(cluster.Id, member.Uuid);
 }
コード例 #6
0
 protected void StopMemberAndWait(IHazelcastInstance client, RemoteController.Client remoteController,
     Cluster cluster, Member member)
 {
     var resetEvent = new ManualResetEventSlim();
     var regId = client.GetCluster().AddMembershipListener(new MembershipListener
     {
         OnMemberRemoved = @event => resetEvent.Set()
     });
     StopMember(remoteController, cluster, member);
     Assert.IsTrue(resetEvent.Wait(120*1000), "The member did not get removed in 120 seconds");
     Assert.IsTrue(client.GetCluster().RemoveMembershipListener(regId));
 }
コード例 #7
0
 protected virtual void StopMember(RemoteController.Client remoteController, Cluster cluster, Member member)
 {
     _logger.Info("Shutting down  member " + member.Uuid);
     remoteController.shutdownMember(cluster.Id, member.Uuid);
 }
コード例 #8
0
 protected virtual void ResumeMember(RemoteController.Client remoteController, Cluster cluster, Member member)
 {
     remoteController.resumeMember(cluster.Id, member.Uuid);
 }
コード例 #9
0
 public void Read (TProtocol iprot)
 {
   iprot.IncrementRecursionDepth();
   try
   {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) { 
         break;
       }
       switch (field.ID)
       {
         case 0:
           if (field.Type == TType.Struct) {
             Success = new Member();
             Success.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         case 1:
           if (field.Type == TType.Struct) {
             ServerException = new ServerException();
             ServerException.Read(iprot);
           } else { 
             TProtocolUtil.Skip(iprot, field.Type);
           }
           break;
         default: 
           TProtocolUtil.Skip(iprot, field.Type);
           break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
   }
   finally
   {
     iprot.DecrementRecursionDepth();
   }
 }