Class AgentBuilder.CircularityLock.Global

    • Field Detail

      • lock

        private final java.util.concurrent.locks.Lock lock
        The lock to hold.
      • time

        private final long time
        The time to wait for the lock.
      • timeUnit

        private final java.util.concurrent.TimeUnit timeUnit
        The time's time unit.
    • Constructor Detail

      • Global

        public Global()
        Creates a new global circularity lock that does not wait for a release and a default size for the amount of global locks.
      • Global

        public Global​(long time,
                      java.util.concurrent.TimeUnit timeUnit)
        Creates a new global circularity lock with a default size for the amount of global locks.
        Parameters:
        time - The time to wait for the lock.
        timeUnit - The time's time unit.
      • Global

        public Global​(int size)
        Creates a new global circularity lock that does not wait for a release.
        Parameters:
        size - The amount of locks used in parallel or 0 if no global locks should be used.
      • Global

        public Global​(int size,
                      long time,
                      java.util.concurrent.TimeUnit timeUnit)
        Creates a new global circularity lock.
        Parameters:
        size - The amount of locks used in parallel or 0 if no global locks should be used.
        time - The time to wait for the lock.
        timeUnit - The time's time unit.