public Interface(FullShardAddress addr, bool updateAddress, ThreadOperations threadOps, INotifiable notify) : this(Member(addr.ShardID.ReplicaLevel), GetMyAddress(addr.ConsensusPort), addr.ShardID.XYZ, threadOps, notify, a => { if (updateAddress) { PublishAddress(new FullShardAddress(addr.ShardID, a.Host, addr.PeerPort, a.Port, addr.ObserverPort)); } } ) {}
public Interface(Configuration.Member self, Address selfAddress, Int3 myCoords, ThreadOperations threadOps, INotifiable notify, Action <Address> onAddressBound = null) : base(self) { Notify = notify; ThreadOps = threadOps; var cfg = BuildConfig(); if (!cfg.ContainsIdentifier(self)) { throw new ArgumentOutOfRangeException("Given self address is not contained by current SD configuration"); } Log.Message("Starting consensus with configuration " + cfg); actualPort = Start(cfg, selfAddress, onAddressBound); MyID = new ShardID(myCoords, self.Identifier); if (threadOps != ThreadOperations.Nothing) { gecThread = new Thread(new ThreadStart(GECThreadMain)); gecThread.Start(); } }
public CoreThreadOperationsTests() { this.asyncOperations = new ThreadOperations(); }
public DesktopThreadOperationsTests() { this.asyncOperations = new ThreadOperations(); }