public class AgentHibernateDao extends BambooHibernateObjectDao implements AgentDao
Constructor and Description |
---|
AgentHibernateDao() |
Modifier and Type | Method and Description |
---|---|
PipelineDefinition |
findAgentByName(String name)
Retrieve a pipelineDefinition by name.
|
List<PipelineDefinition> |
findAll() |
List<PipelineDefinition> |
findAllAgents()
Retrieves all agents();
|
Set<PipelineDefinition> |
findAllAgentsForAgentIds(Collection<Long> agentIds)
Return a list of agents by their ids
|
List<PipelineDefinition> |
findAllAgentsWithNameLike(String nameLike)
Retrun a list of agents whose name is like the provided string.
|
List<ElasticAgentDefinition> |
findAllElasticAgents(Collection<String> instanceIds)
Retrieves all elastic agents
|
List<ElasticAgentDefinition> |
findAllElasticAgents(int firstResult,
int maxResults)
Retrieves n most recently terminated elastic agents, ordered by termination time,
descending.
|
List<LocalAgentDefinition> |
findAllLocalAgents()
Retrieves all local agents
|
List<RemoteAgentDefinition> |
findAllRemoteAgents()
Retrieves all remote agents
|
List<ElasticAgentDefinition> |
findNotShutDownElasticAgents()
Retrieves all agents without a shutdown time defined
|
PipelineDefinition |
getAgentById(long id)
Retrieve the agentDefinition object.
|
long |
getAgentCount(Class<? extends PipelineDefinition> agentDefinitionClass)
Retrieves the amount of agents of given type stored in the database
|
LocalAgentDefinition |
getLocalAgentById(long id)
Retrieve the localAgentDefinition
|
Class |
getPersistentClass() |
RemoteAgentDefinition |
getRemoteAgentById(long id)
Retrieve the remoteAgentDefinition
|
PipelineDefinition |
saveAndReturn(PipelineDefinition pipelineDefinition)
Saves the passed definition and returns a new copy of the updated pipeline definition
|
executeReturnLong, findById, findById
findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findById
public Class getPersistentClass()
getPersistentClass
in interface bucket.core.persistence.ObjectDao
@NotNull public PipelineDefinition saveAndReturn(@NotNull PipelineDefinition pipelineDefinition)
AgentDao
saveAndReturn
in interface AgentDao
pipelineDefinition
- to savepublic PipelineDefinition getAgentById(long id)
AgentDao
getAgentById
in interface AgentDao
id
- - the id for the agent to be retrievedpublic LocalAgentDefinition getLocalAgentById(long id)
AgentDao
getLocalAgentById
in interface AgentDao
id
- of the agentpublic RemoteAgentDefinition getRemoteAgentById(long id)
AgentDao
getRemoteAgentById
in interface AgentDao
id
- of the agentpublic List<PipelineDefinition> findAll()
findAll
in interface bucket.core.persistence.ObjectDao
findAll
in class com.atlassian.hibernate.HibernateObjectDao
public List<PipelineDefinition> findAllAgents()
AgentDao
findAllAgents
in interface AgentDao
public List<RemoteAgentDefinition> findAllRemoteAgents()
AgentDao
findAllRemoteAgents
in interface AgentDao
public List<LocalAgentDefinition> findAllLocalAgents()
AgentDao
findAllLocalAgents
in interface AgentDao
public List<ElasticAgentDefinition> findNotShutDownElasticAgents()
AgentDao
findNotShutDownElasticAgents
in interface AgentDao
public long getAgentCount(Class<? extends PipelineDefinition> agentDefinitionClass)
AgentDao
getAgentCount
in interface AgentDao
agentDefinitionClass
- agent type@NotNull public List<ElasticAgentDefinition> findAllElasticAgents(int firstResult, int maxResults)
AgentDao
findAllElasticAgents
in interface AgentDao
@NotNull public List<ElasticAgentDefinition> findAllElasticAgents(@NotNull Collection<String> instanceIds)
AgentDao
findAllElasticAgents
in interface AgentDao
instanceIds
- the instances ids on which the agents were running@NotNull public List<PipelineDefinition> findAllAgentsWithNameLike(@NotNull String nameLike)
AgentDao
findAllAgentsWithNameLike
in interface AgentDao
nameLike
- the string to matchpublic Set<PipelineDefinition> findAllAgentsForAgentIds(@NotNull Collection<Long> agentIds)
AgentDao
findAllAgentsForAgentIds
in interface AgentDao
PipelineDefinition
@Nullable public PipelineDefinition findAgentByName(@NotNull String name)
AgentDao
findAgentByName
in interface AgentDao
name
- of the agent to findCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.