Package org.ngrinder.model

Examples of org.ngrinder.model.AgentInfo


   *
   * @param id agent id in db
   */
  @Override
  public void stopAgent(Long id) {
    AgentInfo agent = getOne(id);
    if (agent == null) {
      return;
    }
    agentRequestCache.put(extractRegionFromAgentRegion(agent.getRegion()) + "|" + createKey(agent),
        new ClusteredAgentRequest(agent.getIp(), agent.getName(), STOP_AGENT));
  }
View Full Code Here


   *
   * @param id agent id in db.
   */
  @Override
  public void requestShareAgentSystemDataModel(Long id) {
    AgentInfo agent = getOne(id);
    if (agent == null) {
      return;
    }
    agentRequestCache.put(extractRegionFromAgentRegion(agent.getRegion()) + "|" + createKey(agent),
        new ClusteredAgentRequest(agent.getIp(), agent.getName(), SHARE_AGENT_SYSTEM_DATA_MODEL));
  }
View Full Code Here

   * @param name agent name
   * @return {@link SystemDataModel} instance.
   */
  @Override
  public SystemDataModel getSystemDataModel(String ip, String name) {
    AgentInfo found = agentManagerRepository.findByIpAndHostName(ip, name);
    String systemStat = (found == null) ? null : found.getSystemStat();
    return (StringUtils.isEmpty(systemStat)) ? new SystemDataModel() : gson.fromJson(systemStat,
        SystemDataModel.class);
  }
View Full Code Here

   *
   * @param id agent id
   */
  @Override
  public void update(Long id) {
    AgentInfo agent = getOne(id);
    if (agent == null) {
      return;
    }
    agentRequestCache.put(extractRegionFromAgentRegion(agent.getRegion()) + "|" + createKey(agent),
        new ClusteredAgentRequest(agent.getIp(), agent.getName(), UPDATE_AGENT));
  }
View Full Code Here

TOP

Related Classes of org.ngrinder.model.AgentInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.