예제 #1
0
        public static NodeHeartbeatResponse NewNodeHeartbeatResponse(int responseId, NodeAction
                                                                     action, IList <ContainerId> containersToCleanUp, IList <ApplicationId> applicationsToCleanUp
                                                                     , MasterKey containerTokenMasterKey, MasterKey nmTokenMasterKey, long nextHeartbeatInterval
                                                                     )
        {
            NodeHeartbeatResponse response = recordFactory.NewRecordInstance <NodeHeartbeatResponse
                                                                              >();

            response.SetResponseId(responseId);
            response.SetNodeAction(action);
            response.SetContainerTokenMasterKey(containerTokenMasterKey);
            response.SetNMTokenMasterKey(nmTokenMasterKey);
            response.SetNextHeartBeatInterval(nextHeartbeatInterval);
            if (containersToCleanUp != null)
            {
                response.AddAllContainersToCleanup(containersToCleanUp);
            }
            if (applicationsToCleanUp != null)
            {
                response.AddAllApplicationsToCleanup(applicationsToCleanUp);
            }
            return(response);
        }
예제 #2
0
 static ResourceTrackerService()
 {
     resync.SetNodeAction(NodeAction.Resync);
     shutDown.SetNodeAction(NodeAction.Shutdown);
 }