Esempio n. 1
0
 LeaseImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     leaseClient            = new LeaseClient(managedChannel.channel);
     // this.stub = connectionManager.NewStub<LeaseFutureStub>(null);
     // this.leaseStub = connectionManager.NewStub<LeaseStub>(null);
     // this.keepAlives = new ConcurrentDictionary<string, impl.KeepAlive>();
     //this.scheduledExecutorService = MoreExecutors.listeningDecorator(Executors.newScheduledThreadPool(2));
 }
Esempio n. 2
0
        public ManagedChannel NewChannel()
        {
            ManagedChannel managedChannel = null;

            lock (lstChannels)
            {
                Uri     uri     = this.builder.LoadBalancerFactory().GetUri();
                Channel channel = new Channel(uri.Host, uri.Port, ChannelCredentials.Insecure);
                channel.ConnectAsync();
                managedChannel = new ManagedChannel()
                {
                    Channel = channel
                };
                //   channel.ShutdownAsync();
                lstChannels.Add(managedChannel);
            }
            return(managedChannel);
        }
Esempio n. 3
0
 AuthImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     authClient             = new AuthClient(managedChannel.Channel);
 }
Esempio n. 4
0
 public KVImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     kVClient = new KVClient(managedChannel.Channel);
 }
Esempio n. 5
0
 LockImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     lockClient             = new LockClient(managedChannel.Channel);
 }
Esempio n. 6
0
 WatchImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     watchClient            = new WatchClient(managedChannel.channel);
 }
Esempio n. 7
0
 MaintenanceImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     maintenanceClient      = new MaintenanceClient(managedChannel.Channel);
 }
Esempio n. 8
0
 ClusterImpl(ClientConnectionManager connectionManager)
 {
     this.connectionManager = connectionManager;
     managedChannel         = connectionManager.NewChannel();
     clusterClient          = new ClusterClient(managedChannel.channel);
 }