예제 #1
0
파일: CommunicatorI.cs 프로젝트: zhj149/ice
        public Task flushBatchRequestsAsync(Ice.CompressBatch compressBatch,
                                            IProgress <bool> progress = null,
                                            CancellationToken cancel  = new CancellationToken())
        {
            var completed = new FlushBatchTaskCompletionCallback(progress, cancel);
            var outgoing  = new CommunicatorFlushBatchAsync(_instance, completed);

            outgoing.invoke(_flushBatchRequests_name, compressBatch, false);
            return(completed.Task);
        }
예제 #2
0
파일: CommunicatorI.cs 프로젝트: zhj149/ice
        public AsyncResult begin_flushBatchRequests(Ice.CompressBatch compressBatch, AsyncCallback cb, object cookie)
        {
            var result = new CommunicatorFlushBatchCompletionCallback(this,
                                                                      _instance,
                                                                      _flushBatchRequests_name,
                                                                      cookie,
                                                                      cb);
            var outgoing = new CommunicatorFlushBatchAsync(_instance, result);

            outgoing.invoke(_flushBatchRequests_name, compressBatch, false);
            return(result);
        }
예제 #3
0
        public void flushAsyncBatchRequests(Ice.CompressBatch compressBatch, CommunicatorFlushBatchAsync outAsync)
        {
            List <Ice.ObjectAdapterI> adapters;

            lock (this)
            {
                adapters = new List <Ice.ObjectAdapterI>(_adapters);
            }

            foreach (Ice.ObjectAdapterI adapter in adapters)
            {
                adapter.flushAsyncBatchRequests(compressBatch, outAsync);
            }
        }
예제 #4
0
파일: CommunicatorI.cs 프로젝트: zhj149/ice
 public void flushBatchRequests(Ice.CompressBatch compressBatch)
 {
     try
     {
         var completed = new FlushBatchTaskCompletionCallback();
         var outgoing  = new CommunicatorFlushBatchAsync(_instance, completed);
         outgoing.invoke(_flushBatchRequests_name, compressBatch, true);
         completed.Task.Wait();
     }
     catch (AggregateException ex)
     {
         throw ex.InnerException;
     }
 }
예제 #5
0
        public void flushAsyncBatchRequests(Ice.CompressBatch compressBatch, CommunicatorFlushBatchAsync outAsync)
        {
            List <IncomingConnectionFactory> f;

            lock (this)
            {
                f = new List <IncomingConnectionFactory>(_incomingConnectionFactories);
            }

            foreach (IncomingConnectionFactory factory in f)
            {
                factory.flushAsyncBatchRequests(compressBatch, outAsync);
            }
        }
예제 #6
0
파일: CommunicatorI.cs 프로젝트: zhj149/ice
 public AsyncResult begin_flushBatchRequests(Ice.CompressBatch compressBatch)
 {
     return(begin_flushBatchRequests(compressBatch, null, null));
 }
예제 #7
0
 public void flushBatchRequests(Ice.CompressBatch compressBatch)
 {
     flushBatchRequestsAsync(compressBatch).Wait();
 }