diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 11:17:34 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 11:17:34 +0100 |
commit | 18ab8207bd14def950fd399c60d9ee54fab75d3b (patch) | |
tree | a82af333127184acc6be6e0969919cb20be5e8b3 /csharp/src/Ice/ConnectionI.cs | |
parent | Fixed ICE-7548 - getAdminProxy no longer returns 0 if synchronization is in p... (diff) | |
download | ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.tar.bz2 ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.tar.xz ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.zip |
Fixed ICE-7169 and ICE-7375 - add option to specify if batch requests flushed with the communicator/connection should be compressed
Diffstat (limited to 'csharp/src/Ice/ConnectionI.cs')
-rw-r--r-- | csharp/src/Ice/ConnectionI.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/csharp/src/Ice/ConnectionI.cs b/csharp/src/Ice/ConnectionI.cs index 63a5148742a..a1cbdde8fcf 100644 --- a/csharp/src/Ice/ConnectionI.cs +++ b/csharp/src/Ice/ConnectionI.cs @@ -473,9 +473,9 @@ namespace Ice return _batchRequestQueue; } - public void flushBatchRequests() + public void flushBatchRequests(CompressBatch compressBatch) { - flushBatchRequestsAsync().Wait(); + flushBatchRequestsAsync(compressBatch).Wait(); } private class ConnectionFlushBatchCompletionCallback : AsyncResultCompletionCallback @@ -517,21 +517,24 @@ namespace Ice private Connection _connection; } - public Task flushBatchRequestsAsync(IProgress<bool> progress = null, + public Task flushBatchRequestsAsync(CompressBatch compressBatch, + IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { var completed = new FlushBatchTaskCompletionCallback(progress, cancel); var outgoing = new ConnectionFlushBatchAsync(this, _instance, completed); - outgoing.invoke(_flushBatchRequests_name); + outgoing.invoke(_flushBatchRequests_name, compressBatch); return completed.Task; } - public AsyncResult begin_flushBatchRequests(AsyncCallback cb = null, object cookie = null) + public AsyncResult begin_flushBatchRequests(CompressBatch compressBatch, + AsyncCallback cb = null, + object cookie = null) { var result = new ConnectionFlushBatchCompletionCallback(this, _communicator, _instance, _flushBatchRequests_name, cookie, cb); var outgoing = new ConnectionFlushBatchAsync(this, _instance, result); - outgoing.invoke(_flushBatchRequests_name); + outgoing.invoke(_flushBatchRequests_name, compressBatch); return result; } |