public async Task <bool> TryAddAsync(TKey key, TValue value)
        {
            var(keyData, valueData) = ToSafeData(key, value);
            var requestMessage  = TransactionalMultiMapPutCodec.EncodeRequest(Name, TransactionId, ContextId, keyData, valueData);
            var responseMessage = await Cluster.Messaging.SendToMemberAsync(requestMessage, TransactionClientConnection).CAF();

            return(TransactionalMultiMapPutCodec.DecodeResponse(responseMessage).Response);
        }
예제 #2
0
        /// <exception cref="Hazelcast.Transaction.TransactionException"></exception>
        public virtual bool Put(TKey key, TValue value)
        {
            var keyData   = ToData(key);
            var valueData = ToData(value);
            var request   = TransactionalMultiMapPutCodec.EncodeRequest(Name, GetTransactionId(), GetThreadId(),
                                                                        keyData, valueData);

            return(Invoke(request, m => TransactionalMultiMapPutCodec.DecodeResponse(m).Response));
        }