Skip to content

Commit

Permalink
JS-2096 JAgentRef.processLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zschimmer committed Nov 6, 2023
1 parent 348138a commit d984154
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package js7.data_for_java.agent

import io.vavr.control.Either as VEither
import java.util.Optional
import java.util.{Optional, OptionalInt}
import javax.annotation.Nonnull
import js7.base.problem.Problem
import js7.data.agent.{AgentPath, AgentRef}
Expand Down Expand Up @@ -30,6 +30,10 @@ extends JJsonable[JAgentRef] with JUnsignedSimpleItem
def directors: java.util.List[SubagentId] =
asScala.directors.asJava

@Nonnull
def processLimit: java.util.OptionalInt =
asScala.processLimit.toJavaPrimitive

@Nonnull
def withRevision(revision: Optional[ItemRevision]) =
copy(asScala.withRevision(revision.toScala))
Expand All @@ -40,9 +44,13 @@ object JAgentRef extends JJsonable.Companion[JAgentRef]
@Nonnull
def of(
@Nonnull path: AgentPath,
@Nonnull directors: java.lang.Iterable[SubagentId])
@Nonnull directors: java.lang.Iterable[SubagentId],
@Nonnull processLimit: OptionalInt)
: JAgentRef =
JAgentRef(AgentRef(path, directors = directors.asScala.toVector))
JAgentRef(AgentRef(
path,
directors = directors.asScala.toVector,
processLimit = processLimit.toScala))

@Nonnull
def of(
Expand Down

0 comments on commit d984154

Please sign in to comment.