chore: Bump version to 1.6.10 and enhance AgentContext and AgentExecutorService with optional agent list handling

This commit is contained in:
extio-de
2025-09-14 11:29:48 +02:00
parent 5c3c89b580
commit 47b63dcb40
4 changed files with 33 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ package de.extio.lmlib.agent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -41,6 +42,12 @@ public final class AgentContext {
private Consumer<AgentContext> agentContextUpdateConsumer;
public AgentContext() {
this.agents = new HashMap<>();
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
}
public AgentContext(final Collection<? extends BaseAgent> agents) {
this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent));
this.context = new ConcurrentHashMap<>();