Class AgentBuilder.CircularityLock.WithInnerClassLoadingLock

    • Constructor Detail

      • WithInnerClassLoadingLock

        protected WithInnerClassLoadingLock​(int size)
        Creates a circularity lock with a global outer lock.
        Parameters:
        size - The amount of locks used in parallel or 0 if no global locks should be used.
    • 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.
      • doAcquire

        protected abstract boolean doAcquire()
        Acquires the actual lock for the current thread.
        Returns:
        true if the lock was acquired successfully, false if it is already hold.