private MessageId BuildMessageId(Broadcast.MessageId messageId) { return(new MessageId { ServerId = messageId.SenderId, ServerCounter = messageId.SenderCounter }); }
public async Task BroadcastFailure( string serverUrl, string partitionId, Broadcast.MessageId messageId, string failedServerId) { try { AdvancedReplicaCommunicationConnection connection = new AdvancedReplicaCommunicationConnection(serverUrl); await connection.BroadcastFailure(partitionId, messageId, failedServerId, DEFAULT_TIMEOUT); } catch (RpcException exception) { HandleRpcException(serverUrl, exception); } }
public async Task BroadcastFailure( string partitionId, Broadcast.MessageId messageId, string failedServerId, long timeout) { await client.BroadcastFailureAsync( new BroadcastFailureRequest { PartitionId = partitionId, MessageId = BuildMessageId(messageId), FailedServerId = failedServerId }, deadline : DateTime.UtcNow.AddMilliseconds(timeout)); }
public async Task BroadcastWrite( string partitionId, Broadcast.MessageId messageId, string key, string value, CausalConsistency.ImmutableVectorClock replicaTimestamp, string writeServerId, long timeout) { await client.BroadcastWriteAsync( new BroadcastWriteRequest { PartitionId = partitionId, MessageId = BuildMessageId(messageId), Key = key, Value = value, ReplicaTimestamp = BuildClock(replicaTimestamp), WriteServerId = writeServerId }, deadline : DateTime.UtcNow.AddMilliseconds(timeout)); }