Class InducedIdleEventNode.IdScope

java.lang.Object
com.dna.jopt.member.unit.node.event.InducedIdleEventNode.IdScope
Enclosing class:
InducedIdleEventNode

public static final class InducedIdleEventNode.IdScope extends Object
The numbers of the InducedIdleEventNodes created in one task of a parallel step, for example one task of a generation of the genetic evolution. A scope takes one number of the sequence when it is created. A node created on a thread inside the scope gets the number of the scope and its count in the scope, so its ID does not depend on the other tasks or on the threads that run them. Scopes created in a fixed order, for example per task before the tasks run, give the same IDs in every run with the same seed.
Since:
31/01/2020
Version:
31/01/2020
Author:
DNA
  • Method Details

    • create

      public static InducedIdleEventNode.IdScope create()
      Creates a scope with the next number of the sequence.
      Returns:
      the scope
    • begin

      public void begin()
      Makes this scope the scope of the current thread until end() is called.
    • end

      public static void end()
      Ends the scope of the current thread.