/**
  * Get agents. agent list is obtained from DB and {@link AgentManager}
  *
  * <p>This includes not persisted agent as well.
  *
  * @return agent list
  */
 @Transactional
 public List<AgentInfo> getAgentList() {
   Set<AgentIdentity> allAttachedAgents = agentManager.getAllAttachedAgents();
   List<AgentInfo> agents = agentRepository.findAll();
   List<AgentInfo> agentList = new ArrayList<AgentInfo>(allAttachedAgents.size());
   for (AgentIdentity eachAgentIdentity : allAttachedAgents) {
     AgentControllerIdentityImplementation agentControllerIdentity =
         (AgentControllerIdentityImplementation) eachAgentIdentity;
     agentList.add(creatAgentInfo(agentControllerIdentity, agents));
   }
   return agentList;
 }
 /**
  * Get agents. agent list is obtained only from DB
  *
  * @return agent list
  */
 @Cacheable("agents")
 public List<AgentInfo> getAgentListOnDB() {
   return agentRepository.findAll();
 }