コード例 #1
0
        private async Task AcquireLock(IDistributedLock consulLock, CancellationToken cancellationToken)
        {
            while (!cancellationToken.IsCancellationRequested)
            {
                if (!consulLock.IsHeld)
                {
                    if (_currentRole != NodeRole.Follower)
                    {
                        _applicationEvents.Publish(new NodeRoleTransitioned(NodeRole.Follower));
                        _currentRole = NodeRole.Follower;
                    }

                    consulLock.Acquire(cancellationToken);
                }

                while (!cancellationToken.IsCancellationRequested && consulLock.IsHeld)
                {
                    if (_currentRole != NodeRole.Leader)
                    {
                        _applicationEvents.Publish(new NodeRoleTransitioned(NodeRole.Leader));
                        _currentRole = NodeRole.Leader;
                    }

                    await Task.Delay(TimeSpan.FromSeconds(10), cancellationToken).ConfigureAwait(false);
                }
            }
        }
コード例 #2
0
ファイル: LocalNode.cs プロジェクト: freshncp/Larva.RaftAlgo
 private void BecomeCandidate()
 {
     if (Role == NodeRole.Follower)
     {
         Role = NodeRole.Candidate;
     }
 }
コード例 #3
0
ファイル: Common.cs プロジェクト: AzoresCabbage/RaftCore
 public VoteBackStruct voteForMe(int term, int CandidateId, int lastLogIdx, int lastLogTerm)
 {
     lock (this)
     {
         VoteBackStruct ret = new VoteBackStruct();
         ret.Term        = term_;
         ret.VoteGranted = false;
         if (term > term_) // recv higher term request
         {
             Console.WriteLine(String.Format("{0} [{1}] voted in term {2}, recv_term {3} from {4}, isVoteInThisTerm_ {5}!", id, role, term, term, CandidateId, isVoteInThisTerm_));
             role_             = NodeRole.Follower;
             state_            = ServerState.HigherTerm;
             term_             = term;
             isVoteInThisTerm_ = false;
             if (lastLogTerm < getLastLogTerm()) //log最后的term比我小
             {
                 return(ret);
             }
             if (lastLogTerm == getLastLogTerm() && lastLogIdx < log_.Count) //log最后的term和我一样,但是log没有我多
             {
                 return(ret);
             }
             //if(timeout_timer_ != null)
             //    timeout_timer_.Change(curRandTime_, curRandTime_);
             ret.VoteGranted = isVoteInThisTerm_ = true;
             return(ret);
         }
         else
         {
             ret.VoteGranted = false;
             return(ret);
         }
     }
 }
コード例 #4
0
        public void SetRoles(Node node)
        {
            //foreach (NodeRole np in node.NodeRoles)
            //{
            //    node.RemoveNoderole(np.Id);
            //}

            foreach (RepeaterItem ri in rptRoles.Items)
            {
                CheckBox chkView = (CheckBox)ri.FindControl("chkViewAllowed");
                CheckBox chkEdit = (CheckBox)ri.FindControl("chkEditAllowed");
                if (chkView.Checked || chkEdit.Checked)
                {
                    if (!node.Exists(Convert.ToInt32(ViewState[ri.UniqueID])))
                    {
                        NodeRole np = new NodeRole();
                        np.Node        = node;
                        np.Role        = _presenter.GetRole((int)ViewState[ri.UniqueID]);
                        np.ViewAllowed = chkView.Checked;
                        np.EditAllowed = chkEdit.Checked;

                        node.NodeRoles.Add(np);
                    }
                }
            }
        }
コード例 #5
0
 public IDtpNode CreateNode(NodeRole role, int port = -1, IEnumerable <IInstructionSet> instructionSets = null)
 {
     instructionSets = instructionSets == null ? kNoInstructionSets : instructionSets.ToArray();
     if (role == NodeRole.ServerOrClient)
     {
         IDtpNode result = null;
         while (result == null)
         {
             try {
                 result = CreateNode(NodeRole.Server, port, instructionSets);
             } catch {
                 try {
                     result = CreateNode(NodeRole.Client, -1, instructionSets).With(n => { n.Connect(port); });
                 } catch {
                     // gotta catch em all
                 }
             }
         }
         return(result);
     }
     else if (role == NodeRole.Client)
     {
         if (port != -1)
         {
             throw new InvalidOperationException("Use node.Connect, not CreateNode constructor to connect to server!");
         }
         return(new DtpNode(new NullClientSource(), instructionSets));
     }
     else
     {
         return(new DtpNode(new SocketClientSource(port), instructionSets));
     }
 }
コード例 #6
0
 /// <summary>
 /// Node info
 /// </summary>
 /// <param name="id"></param>
 /// <param name="serviceUri"></param>
 /// <param name="state"></param>
 /// <param name="role"></param>
 public NodeInfo(string id, Uri serviceUri, NodeState state, NodeRole role)
 {
     Id         = id;
     ServiceUri = serviceUri;
     State      = state;
     Role       = role;
 }
コード例 #7
0
 public SellerNode(SellerNode mainSeller)
 {
     version     = mainSeller.version;
     uri         = new Uri(mainSeller.uri.AbsoluteUri);
     machineName = mainSeller.machineName;
     role        = mainSeller.role;
 }
コード例 #8
0
        public bool AddNode(IKey key, NodeRole nodeRole, IPAddress ipAddress)
        {
            AccountIdentity accountIdentity = GetAccountIdentity(key);

            if (accountIdentity == null)
            {
                GetOrAddIdentity(key);

                accountIdentity = GetAccountIdentity(key);
            }

            if (accountIdentity != null)
            {
                lock (_sync)
                {
                    NodeRecord node = _dataContext.Nodes.FirstOrDefault(n => n.Identity == accountIdentity && n.NodeRole == (byte)nodeRole);

                    if (node == null)
                    {
                        node = new NodeRecord {
                            Identity = accountIdentity, IPAddress = ipAddress.GetAddressBytes(), NodeRole = (byte)nodeRole
                        };
                        _dataContext.Nodes.Add(node);
                        if (!_keyToNodeMap.ContainsKey(key))
                        {
                            _keyToNodeMap.Add(key, node);
                        }
                        return(true);
                    }
                }
            }

            return(false);
        }
コード例 #9
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked
     {
         return((NodeIndex * 397) ^ (NodeRole.GetHashCode() * 397) ^ StartTime.GetHashCode());
     }
 }
コード例 #10
0
 private void BecomeSecondary(bool changeStatus = true)
 {
     _currentRole = NodeRole.Secondary;
     if (changeStatus)
     {
         _status.SetStatusBit(UNINITIIALIZED, RUNNING);
     }
 }
コード例 #11
0
        public bool AddNode(IKey key, NodeRole nodeRole, string ipAddressExpression = null)
        {
            if (IPAddress.TryParse(ipAddressExpression ?? "127.0.0.1", out IPAddress ipAddress))
            {
                return(AddNode(key, nodeRole, ipAddress));
            }

            return(false);
        }
コード例 #12
0
ファイル: RoadNode.cs プロジェクト: khoanguyen/ShortestPath
 /// <summary>
 /// Internal constructor used by RoadSystem
 /// </summary>
 /// <param name="id"></param>
 /// <param name="crashed"></param>
 /// <param name="role"></param>
 internal RoadNode(int id,
     bool crashed = false,
     NodeRole role = NodeRole.Normal)
 {
     this.ID = id;
     this.Crashed = crashed;
     this.Role = role;
     this.Links = new LinkCollection();
 }
コード例 #13
0
        public void SetNodeStatus(ServerNode primary, NodeRole status)
        {
            ManagementCommand command = GetManagementCommand(ConfigurationCommandUtil.MethodName.SetNodeStatus, 1);

            command.Parameters.AddParameter(primary);
            command.Parameters.AddParameter(status);

            ExecuteCommandOnConfigurationServer(command, false);
        }
コード例 #14
0
ファイル: LocalNode.cs プロジェクト: freshncp/Larva.RaftAlgo
 private void BecomeLeader()
 {
     if (Role == NodeRole.Candidate)
     {
         Role = NodeRole.Leader;
         var nextIndex  = new Dictionary <string, long>();
         var matchIndex = new Dictionary <string, long>();
         State = new LeaderState(State, nextIndex, matchIndex);
     }
 }
コード例 #15
0
ファイル: LocalNode.cs プロジェクト: freshncp/Larva.RaftAlgo
        private void BecomeFollower()
        {
            if (Role != NodeRole.Follower)
            {
                Role  = NodeRole.Follower;
                State = new NodeState(State.CurrentTerm, null, State.CommitIndex, State.LastApplied);

                StartElection();
            }
        }
コード例 #16
0
ファイル: ApiController.cs プロジェクト: captncraig/Opserver
        public async Task <ActionResult> NodeEnable(string node)
        {
            if (!Current.User.Is(Roles.ApiRequest))
            {
                return(JsonError("Invalid API key"));
            }

            await NodeRole.EnableAllAsync(node);

            return(NodeRoles(node));
        }
コード例 #17
0
 public void SetNodeStatus(ServerNode primary, NodeRole status)
 {
     try
     {
         this.service.SetNodeStatus(this.Cluster, this.shard, primary, status);
         NotifyConfigurationChange(this.cluster);
     }
     catch (System.Exception ex)
     {
     }
 }
コード例 #18
0
        public async Task <ActionResult> NodeDisable(string node)
        {
            if (!Current.IsInRole(Roles.ApiRequest))
            {
                return(JsonError("Invalid API key"));
            }

            await NodeRole.DisableAllAsync(node).ConfigureAwait(false);

            return(NodeRoles(node));
        }
コード例 #19
0
ファイル: NodeSession.cs プロジェクト: briankchan/libimdg
        public NodeSession(Socket socket, NodeRole localRole)
        {
            this.socket    = socket;
            this.localRole = localRole;
            this.ns        = new NetworkStream(socket, FileAccess.ReadWrite, true);
            this.reader    = new BinaryReader(ns, Encoding.UTF8, true);
            this.writer    = new BinaryWriter(ns, Encoding.UTF8, true);

            ProcessHandshake();

            this.frameWriter = new FrameWriter(writer);
//         this.frameReader = new FrameReader(reader);
        }
コード例 #20
0
        static public MemoryStream GenerateHandshake(NodeRole nr, params object[] info)
        {
            MemoryStream ms = new MemoryStream();

            List <object> args = new List <object>();

            args.Add(nr);
            args.AddRange(info);

            Serializer.Serialize(ms, args.ToArray());

            return(ms);
        }
コード例 #21
0
 public NodeResults(string node)
 {
     Roles = NodeRole.Get(node).ToList();
     foreach (var r in Roles)
     {
         if (r.Active)
         {
             Active++;
         }
         else
         {
             Inactive++;
         }
     }
 }
コード例 #22
0
        internal DtpNodeSession(DtpNode node, Stream connection, NodeRole localRole)
        {
            Trace.Assert(localRole.HasFlag(NodeRole.Client) != localRole.HasFlag(NodeRole.Server));

            aliveCancellationToken = aliveCancellationTokenSource.Token;

            m_node       = node;
            m_connection = connection;
            m_localRole  = localRole;

            if (m_localRole == NodeRole.Client)
            {
                m_locallyInitiatedUidSet = new UniqueIdentificationSet(kClientLitIdLow, kClientLitIdHigh);
            }
            else // Server
            {
                m_locallyInitiatedUidSet = new UniqueIdentificationSet(kServerLitIdLow, kServerLitIdHigh);
            }

            // - Setup Frame Processing --------------------------------------------------------------
            // : Setup Frame Processors :
            InitializeFrameProcessors(Environment.ProcessorCount);

            // : Setup Reader/Writer Workers :
            m_reader            = new BinaryReader(m_connection, Encoding.Default, true);
            m_frameReaderThread = new Thread(FrameReaderThreadStart)
            {
                IsBackground = true
            };
            m_frameReaderThread.Start();

            m_writer            = new BinaryWriter(m_connection, Encoding.Default, true);
            m_frameWriterThread = new Thread(FrameWriterThreadStart)
            {
                IsBackground = true
            };
            m_frameWriterThread.Start();

            // If we're the client, Send DSP_EX_INIT to elevate from DSP to DSPEx
            // If we're the server, the DSP_EX_INIT opcode will be read by the frame reader thread.
            if (m_localRole == NodeRole.Client)
            {
                m_writer.Write((byte)DTP.DSPEX_INIT);
            }
        }
コード例 #23
0
 public IDtpNode CreateNode(NodeRole role, string pipeName, IEnumerable <IInstructionSet> instructionSets = null)
 {
     if (role == NodeRole.ServerOrClient)
     {
         throw new ArgumentException("Cannot use " + role + " with named pipe constructor.");
     }
     else if (role == NodeRole.Client)
     {
         if (pipeName != null)
         {
             throw new InvalidOperationException("Use node.Connect, not CreateNode constructor!");
         }
         return(new DtpNode(new NullClientSource(), instructionSets));
     }
     else
     {
         return(new DtpNode(new NamedPipeClientSource(pipeName), instructionSets));
     }
 }
コード例 #24
0
ファイル: Common.cs プロジェクト: AzoresCabbage/RaftCore
 public void StartTimer()
 {
     curRandTime_ = rand_.Next(Config.Heartbeat_interval * 3, Config.Heartbeat_interval * 4);
     Console.WriteLine(String.Format("{0} [{1}] current timer = {2}", id, role, curRandTime_));
     timeout_timer_ = new Timer(
         (Object obj) => {
         lock (this)
         {
             role_             = NodeRole.Candidate;
             state_            = ServerState.Timeout;
             term_             = term_ + 1;
             isVoteInThisTerm_ = true;
             Console.WriteLine("{0} [{1}] ServerHandler {2}", id, role, state);
         }
     },
         null,
         curRandTime_,
         curRandTime_);
 }
コード例 #25
0
        public Transform GetNodeTransform(NodeRole role = NodeRole.Default)
        {
            if (role == NodeRole.Root)
            {
                return(transform);
            }

            if (Nodes == null || Nodes.Length == 0)
            {
                return(transform);
            }

            var node = Nodes.FirstOrDefault(n => n.Role == role);

            if (node != null)
            {
                return(node.Transform);
            }

            return(Nodes[0].Transform);
        }
コード例 #26
0
        public ClusterMonitor(NodeRole role, string localAddress, string partnerAddress,
                              Action <NodeState> stateChangedAction = null, Action <ClusterException> clusterExceptionAction = null,
                              IEnumerable <Func <NodeState, bool> > confirmActivationFuncs = null,
                              int partnerTimeout = 500, int connectTimeout = 0, bool becomeActiveWhenPrimaryOnInitialConnectionTimeout = false)
        {
            Role        = role;
            _localState = new InstanceState {
                Role = role, Status = NodeStatus.Initial
            };
            if (role == NodeRole.StandAlone)
            {
                return; //no need to run when standalone
            }
            _stateChangedAction     = stateChangedAction;
            _clusterExceptionAction = clusterExceptionAction;
            _machine = new ClusterStateMachine(HandleClusterException, CreateConfirmFunction(confirmActivationFuncs), becomeActiveWhenPrimaryOnInitialConnectionTimeout);
            _proxy   = new PubSubProxy(localAddress, partnerAddress, OnPartnerUpdate, OnConnectionStateChanged,
                                       connectTimeout);

            _partnerTimeout  = partnerTimeout;
            _pollingInterval = _partnerTimeout / 2;
            _timer           = new Timer(SendUpdateAndCheckForTimeout, null, Timeout.Infinite, _pollingInterval);
        }
コード例 #27
0
        private Task TransitionTo(NodeRole newRole, IDictionary <string, string[]> hostArguments)
        {
            var startTasks = new ConcurrentBag <Task>();

            Parallel.ForEach(_appStarters, starter =>
            {
                AppFunc chain = null;

                if (Chains.ContainsKey(starter.Chain))
                {
                    chain = Chains[starter.Chain];
                }

                chain = chain ?? starter.GetDefaultChain(GetAppFunctionBuilder(starter.Chain), Environment, ApplicationEnvironment);

                if (chain != null)
                {
                    startTasks.Add(starter.BringToState(chain, Environment, ApplicationEnvironment, newRole, hostArguments));
                }
            });

            return(Task.WhenAll(startTasks));
        }
コード例 #28
0
ファイル: Common.cs プロジェクト: AzoresCabbage/RaftCore
        public ServerHandler(int term, int _id, NodeRole _role, List <ClusterNodeSocket> _ExClusterNodeList)
        {
            TestNum = 0;

            id_                 = _id;
            role_               = _role;
            term_               = term;
            state_              = ServerState.Running;
            isVoteInThisTerm_   = false;
            leader_should_stop_ = false;
            is_election_done_   = false;
            lastApplied_        = -1; //与论文不同,论文下标从1开始,所以初始值为0
            commitIndex_        = -1;
            election_state_     = ElectionState.Stop;
            ExClusterNodeList_  = new List <ClusterNodeSocket>();
            ExClusterNodeList_  = _ExClusterNodeList;
            nextIndex_          = new int[ExClusterNodeList_.Count];
            matchIndex_         = new int[ExClusterNodeList_.Count];
            log_                = new List <LogEntryStruct>();
            rand_               = new Random();
            int seed = rand_.Next() * _id;

            rand_ = new Random(seed);
        }
コード例 #29
0
 private static ClusterStateMachine CreateClusterStateMachine(MockStateObserver observer, NodeRole role,
     out InstanceState localState, Action<ClusterException> clusterExceptionAction = null)
 {
     var machine = new ClusterStateMachine(clusterExceptionAction ?? Assert.IsNull, s => true);
     machine.StateChanged.Subscribe(observer);
     localState = new InstanceState {Role = role};
     machine.RaiseEvent(localState, machine.Start);
     return machine;
 }
コード例 #30
0
 public ClusterMonitorBuilder WithRole(NodeRole role)
 {
     _role = role;
     return this;
 }
コード例 #31
0
ファイル: Node.cs プロジェクト: ruslander/luntre
        private void TransitionTo(NodeRole newState)
        {
            _logger.Info(Host + " Change {" + State + "} => {" + newState + "} " + CurrentTerm);

            State = newState;
        }
コード例 #32
0
 public void TestCreateNewNode(int id, bool crashed, NodeRole role)
 {
     var newNode = _roadSystem.CreateNewNode(id, crashed, role);
     Assert.AreEqual(id, newNode.ID);
     Assert.AreEqual(crashed, newNode.Crashed);
     Assert.AreEqual(role, newNode.Role);
     Assert.IsTrue(_roadSystem.Contains(newNode));
     Assert.AreSame(_roadSystem[id], newNode);
 }
コード例 #33
0
 private static ClusterStateMachine CreateClusterStateMachine(MockStateObserver observer, NodeRole role,
     out InstanceState localState, Action<ClusterException> clusterExceptionAction = null, bool becomeActiveWhenPrimaryOnInitialConnectionTimeout = false)
 {
     var machine = new ClusterStateMachine(clusterExceptionAction ?? Assert.IsNull, s => true, becomeActiveWhenPrimaryOnInitialConnectionTimeout);
     machine.StateChanged.Subscribe(observer);
     localState = new InstanceState { Role = role };
     machine.RaiseEvent(localState, machine.Start);
     return machine;
 }
コード例 #34
0
        protected GameNodeProcessors AssignProcessor(Node n, MemoryStream nodeInfo)
        {
            NodeRole role = Serializer.Deserialize <NodeRole>(nodeInfo);

            if (role == NodeRole.CLIENT)
            {
                if (!AuthorizeClient(n))
                {
                    throw new GameNodeException(Log.StDump(n.info, role));
                }

                return(new GameNodeProcessors(ProcessClientMessage, ProcessClientDisconnect));
            }

            if (role == NodeRole.SERVER)
            {
                if (n.info.remote != serverHost)
                {
                    throw new GameNodeException(Log.StDump(n.info, role, "bad server host"));
                }

                if (!AuthorizeServer(n))
                {
                    throw new GameNodeException(Log.StDump(n.info, role));
                }

                return(new GameNodeProcessors(ProcessServerMessage, ProcessServerDisconnect));
            }

            if (role == NodeRole.PLAYER_VALIDATOR)
            {
                PlayerInfo inf = Serializer.Deserialize <PlayerInfo>(nodeInfo);

                if (!AuthorizePlayerValidator(n, inf))
                {
                    throw new GameNodeException(Log.StDump(role, n.info, inf));
                }

                return(new GameNodeProcessors(
                           (mt, stm, nd) => ProcessPlayerValidatorMessage(mt, stm, nd, inf),
                           (di) => ProcessPlayerValidatorDisconnect(di, inf)));
            }

            if (role == NodeRole.PLAYER_AGENT)
            {
                PlayerInfo inf = Serializer.Deserialize <PlayerInfo>(nodeInfo);

                if (!AuthorizePlayerAgent(n, inf))
                {
                    throw new GameNodeException(Log.StDump(role, n.info, inf));
                }

                return(new GameNodeProcessors(
                           (mt, stm, nd) => ProcessPlayerAgentMessage(mt, stm, nd, inf),
                           (di) => ProcessPlayerAgentDisconnect(di, inf)));
            }

            if (role == NodeRole.WORLD_VALIDATOR)
            {
                WorldInfo inf = Serializer.Deserialize <WorldInfo>(nodeInfo);

                if (!AuthorizeWorld(n, inf))
                {
                    throw new GameNodeException(Log.StDump(role, n.info, inf));
                }

                return(new GameNodeProcessors(
                           (mt, stm, nd) => ProcessWorldMessage(mt, stm, nd, inf),
                           (di) => ProcessWorldDisconnect(di, inf)));
            }

            throw new GameNodeException(Log.StDump(n.info, role, "unexpected"));
        }
コード例 #35
0
        private static ClusterStateMachine CreateClusterStateMachine(MockStateObserver observer, NodeRole role,
                                                                     out InstanceState localState, Action <ClusterException> clusterExceptionAction = null, bool becomeActiveWhenPrimaryOnInitialConnectionTimeout = false)
        {
            var machine = new ClusterStateMachine(clusterExceptionAction ?? Assert.IsNull, s => true, becomeActiveWhenPrimaryOnInitialConnectionTimeout);

            machine.StateChanged.Subscribe(observer);
            localState = new InstanceState {
                Role = role
            };
            machine.RaiseEvent(localState, machine.Start);
            return(machine);
        }
コード例 #36
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.I32) {
           HttpPort = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           ThriftPort = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           DataFolder = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           PluginFolder = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.String) {
           ConfFolder = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.String) {
           NodeName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I32) {
           NodeRole = (NodeRole)iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
コード例 #37
0
 public ServerSettings() {
   this._HttpPort = 9800;
   this.__isset.HttpPort = true;
   this._ThriftPort = 9900;
   this.__isset.ThriftPort = true;
   this._DataFolder = "./data";
   this.__isset.DataFolder = true;
   this._PluginFolder = "./plugins";
   this.__isset.PluginFolder = true;
   this._ConfFolder = "./conf";
   this.__isset.ConfFolder = true;
   this._NodeName = "FlexNode";
   this.__isset.NodeName = true;
   this._NodeRole = NodeRole.Master;
   this.__isset.NodeRole = true;
 }
コード例 #38
0
 public CurrentPlatformNodeDto(short pNodeId, NodeRole pNodeRole, bool pBelongsToStandalonePlatform)
 {
     id       = pNodeId;
     nodeRole = pNodeRole;
     belongsToStandalonePlatform = pBelongsToStandalonePlatform;
 }