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) {