コード例 #1
0
 private void Init()
 {
     _connectionManager        = _client.GetConnectionManager();
     _clientMembershipListener = new ClientMembershipListener(_client);
     _connectionManager.AddConnectionHeartBeatListener(this);
     _connectionManager.AddConnectionListener(this);
     _credentials = _client.GetClientConfig().GetCredentials();
 }
コード例 #2
0
 public void Start()
 {
     _connectionManager.AddConnectionListener(this);
     if (IsSmart)
     {
         _connectionManager.AddConnectionHeartBeatListener(this);
         _connectionReopener = new Timer(ReOpenAllConnectionsIfNotOpen, null, 1000, 1000);
     }
 }
コード例 #3
0
        protected ClientInvocationService(HazelcastClient client)
        {
            _client         = client;
            _redoOperations = client.GetClientConfig().GetNetworkConfig().IsRedoOperation();

            var eventTreadCount = EnvironmentUtil.ReadEnvironmentVar("hazelcast.client.event.thread.count") ??
                                  DefaultEventThreadCount;

            _taskScheduler = new StripedTaskScheduler(eventTreadCount);

            _invocationTimeoutMillis =
                (EnvironmentUtil.ReadEnvironmentVar("hazelcast.client.invocation.timeout.seconds") ??
                 DefaultInvocationTimeout) * 1000;

            _clientConnectionManager = (ClientConnectionManager)client.GetConnectionManager();
            _clientConnectionManager.AddConnectionListener(this);
            _clientConnectionManager.AddConnectionHeartBeatListener(this);
        }
コード例 #4
0
        public ClientInvocationService(HazelcastClient client)
        {
            _client         = client;
            _redoOperations = client.GetClientConfig().GetNetworkConfig().IsRedoOperation();

            var eventTreadCount = EnvironmentUtil.ReadEnvironmentVar("hazelcast.client.event.thread.count") ??
                                  DefaultEventThreadCount;

            _taskScheduler = new StripedTaskScheduler(eventTreadCount);

            // TODO: These should be consoliated with the way it's done in the Java client
            _retryCount    = EnvironmentUtil.ReadEnvironmentVar("hazelcast.client.request.retry.count") ?? _retryCount;
            _retryWaitTime = EnvironmentUtil.ReadEnvironmentVar("hazelcast.client.request.retry.wait.time") ??
                             _retryWaitTime;

            _clientConnectionManager = (ClientConnectionManager)client.GetConnectionManager();
            _clientConnectionManager.AddConnectionListener(this);
            _clientConnectionManager.AddConnectionHeartBeatListener(this);
        }