public bool Enlist(string actorName) { bool success = false; if (TransactionLedger.ContainsKey(actorName)) { TransactionLedger[actorName] = true; success = true; Logger.LogInfo($"Transaction actor: {actorName} enlisted for transaction."); } return(success); }
public void StartDistributedUpdate() { transactionLedger = new Dictionary <string, bool>(distributedTransactionActors.Count); foreach (string actor in distributedTransactionActors.Keys) { if (!TransactionLedger.ContainsKey(actor)) { TransactionLedger.Add(actor, false); } } Logger.LogInfo("Distributed transaction started. Waiting for transaction actors to enlist..."); //TODO: start timer... }