Package org.ngrinder.agent.model

Examples of org.ngrinder.agent.model.ClusteredAgentRequest


          String region = getConfig().getRegion() + "|";
          for (String each : keys) {
            if (each.startsWith(region)) {
              if (agentRequestCache.get(each) != null) {
                try {
                  ClusteredAgentRequest agentRequest = cast(agentRequestCache.get(each).get());
                  if (agentRequest.getRequestType() ==
                      ClusteredAgentRequest.RequestType.EXPIRE_LOCAL_CACHE) {
                    expireLocalCache();
                  } else {
                    AgentControllerIdentityImplementation agentIdentity = getAgentIdentityByIpAndName(
                        agentRequest.getAgentIp(), agentRequest.getAgentName());
                    if (agentIdentity != null) {
                      agentRequest.getRequestType().process(ClusteredAgentManagerService.this,
                          agentIdentity);
                    }
                  }
                  agentRequestCache.evict(each);
                } catch (Exception e) {
View Full Code Here


  @Override
  public AgentInfo approve(Long id, boolean approve) {
    AgentInfo agent = super.approve(id, approve);
    if (agent != null) {
      agentRequestCache.put(extractRegionFromAgentRegion(agent.getRegion()) + "|" + createKey(agent),
          new ClusteredAgentRequest(agent.getIp(), agent.getName(), EXPIRE_LOCAL_CACHE));
    }
    return agent;
  }
View Full Code Here

    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

    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

    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.agent.model.ClusteredAgentRequest

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.