AgentContext new ctor;
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<artifactId>lm-lib</artifactId>
|
||||
<groupId>de.extio</groupId>
|
||||
<name>lm-lib</name>
|
||||
<version>1.5.0</version>
|
||||
<version>1.5.1</version>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
|
||||
@@ -32,6 +32,12 @@ public final class AgentContext {
|
||||
|
||||
private volatile boolean skipNextCompletion;
|
||||
|
||||
public AgentContext(final Collection<? extends BaseAgent> agents) {
|
||||
this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent));
|
||||
this.context = new ConcurrentHashMap<>();
|
||||
this.requestStatistic = new AgentRequestStatistic();
|
||||
}
|
||||
|
||||
public AgentContext(final Map<String, ? extends BaseAgent> agents) {
|
||||
this.agents = agents;
|
||||
this.context = new ConcurrentHashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user