Class IdeRuntimeLock

java.lang.Object
nl.pim16aap2.lightkeeper.runtime.IdeRuntimeLock
All Implemented Interfaces:
AutoCloseable

public final class IdeRuntimeLock extends Object implements AutoCloseable
Cross-process lease preventing concurrent use or replacement of a module's IDE runtime.
  • Method Details

    • acquire

      public static IdeRuntimeLock acquire(Path moduleDirectory)
      Attempts to acquire the module-wide IDE runtime lock without waiting.
      Parameters:
      moduleDirectory - Owning Maven module directory.
      Returns:
      The acquired lease.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable