Beispiel #1
0
            public async Task removeCacheAsync(long key, CancellationToken cancellationToken = default(CancellationToken))
            {
                await OutputProtocol.WriteMessageBeginAsync(new TMessage("removeCache", TMessageType.Oneway, SeqId), cancellationToken);

                var args = new removeCacheArgs();

                args.Key = key;

                await args.WriteAsync(OutputProtocol, cancellationToken);

                await OutputProtocol.WriteMessageEndAsync(cancellationToken);

                await OutputProtocol.Transport.FlushAsync(cancellationToken);
            }
Beispiel #2
0
            public async Task removeCache_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
            {
                var args = new removeCacheArgs();
                await args.ReadAsync(iprot, cancellationToken);

                await iprot.ReadMessageEndAsync(cancellationToken);

                try
                {
                    await _iAsync.removeCacheAsync(args.Key, cancellationToken);
                }
                catch (TTransportException)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    Console.Error.WriteLine("Error occurred in processor:");
                    Console.Error.WriteLine(ex.ToString());
                }
            }