Class AgentBuilder.CircularityLock.Default

    • Field Detail

      • threads

        private final java.util.concurrent.ConcurrentMap<java.lang.Thread,​java.lang.Boolean> threads
        A map of threads to an unused boolean to emulate a thread-local state without using thread locals. This avoids using thread-local maps and does not interfere with Java fibers in case that an instrumentation is executed from a virtual thread where thread locals are not permitted.
    • Constructor Detail

      • Default

        public Default()
        Creates a default lock with a default size for the amount of global locks.
      • Default

        public Default​(int size)
        Creates a default lock with the supplied number of global locks.
        Parameters:
        size - The amount of locks used in parallel or 0 if no global locks should be used.
    • Method Detail

      • release

        public void release()
        Releases the circularity lock if it is currently acquired.
      • isLocked

        protected boolean isLocked()
        Returns true if the current thread is currently locked.
        Returns:
        true if the current thread is currently locked.