Exemplo n.º 1
0
        /// <inheritdoc />
        public async Task <int> GetRemainingCapacityAsync()
        {
            var requestMessage  = QueueRemainingCapacityCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CfAwait();

            return(QueueRemainingCapacityCodec.DecodeResponse(responseMessage).Response);
        }
        public int RemainingCapacity()
        {
            var request = QueueRemainingCapacityCodec.EncodeRequest(GetName());

            return(Invoke(request, m => QueueRemainingCapacityCodec.DecodeResponse(m).response));
        }