Interface AgentBuilder.CircularityLock

All Known Implementing Classes:
AgentBuilder.CircularityLock.Default, AgentBuilder.CircularityLock.Global, AgentBuilder.CircularityLock.Inactive, AgentBuilder.CircularityLock.WithInnerClassLoadingLock
Enclosing interface:
AgentBuilder

public static interface AgentBuilder.CircularityLock
A circularity lock is responsible for preventing that a ClassFileLocator is used recursively. This can happen when a class file transformation causes another class to be loaded. Without avoiding such circularities, a class loading is aborted by a ClassCircularityError which causes the class loading to fail.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A default implementation of a circularity lock.
    static class 
    A circularity lock that holds a global monitor and does not permit concurrent access.
    static enum 
    An inactive circularity lock which is always acquirable.
    static class 
    A circularity lock that surrounds the locking mechanism with a global lock to prevent that the locking mechanism itself loads classes and causes a circularity issue.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Attempts to acquire a circularity lock.
    void
    Releases the circularity lock if it is currently acquired.
  • Method Details

    • acquire

      boolean acquire()
      Attempts to acquire a circularity lock.
      Returns:
      true if the lock was acquired successfully, false if it is already hold.
    • release

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