package org.bench4q.master.infrastructure.highavailable;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import org.bench4q.master.domain.RunningAgentInterface;
import org.bench4q.master.domain.RunningScriptInterface;
import org.bench4q.master.domain.entity.Agent;
import org.bench4q.share.models.agent.ServerStatusModel;

public interface HighAvailablePool {
	public Map<String, Agent> getPool();

	public void add(Agent agent);

	public void remove(Agent agent);

	public int blotterSize();

	public Long getMaxAvailableLoad();

	public int getCurrentAvailableLoad();

	public ServerStatusModel queryAgentStatus(Agent agent);

	public void checkAllHeartBeat();

	public void checkHeartBeat(Agent agent);

	public List<RunningAgentInterface> applyFor(int load);

	public void cleanUpAboutTestPlan(
			final Collection<? extends RunningScriptInterface> runningScripts);

	public void setObserver(CurrentLoadObserver currentLoadObserver);

	public Map<UUID, RunningAgentInterface> getAgentRunBlotters();
}
