Class AgentBuilder.CircularityLock.Global

    • Constructor Detail

      • Global

        public Global()
        Creates a new global circularity lock that does not wait for a release.
      • Global

        public Global​(long time,
                      TimeUnit timeUnit)
        Creates a new global circularity lock.
        Parameters:
        time - The time to wait for the lock.
        timeUnit - The time's time unit.
    • Method Detail

      • acquire

        public boolean acquire()
        Attempts to acquire a circularity lock.
        Specified by:
        acquire in interface AgentBuilder.CircularityLock
        Returns:
        true if the lock was acquired successfully, false if it is already hold.