Examples of ClusteredAgentRequest


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

Examples of org.ngrinder.agent.model.ClusteredAgentRequest

  @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

Examples of org.ngrinder.agent.model.ClusteredAgentRequest

    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

Examples of org.ngrinder.agent.model.ClusteredAgentRequest

    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

Examples of org.ngrinder.agent.model.ClusteredAgentRequest

    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
Copyright © 2018 www.massapi.com. 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.