Class WriteLockCleanupHook

All Implemented Interfaces:
Runnable

public class WriteLockCleanupHook extends WriteLockShutdownHook
A cleanup hook that will register with the JVM to remove the WriteLock file during an unexpected shutdown.
Author:
Jeremy Long
  • Constructor Details

    • WriteLockCleanupHook

      public WriteLockCleanupHook()
  • Method Details

    • add

      public void add(WriteLock lock)
      Add the shutdown hook.
      Specified by:
      add in class WriteLockShutdownHook
      Parameters:
      lock - the lock object
    • remove

      public void remove()
      Removes the shutdown hook.
      Specified by:
      remove in class WriteLockShutdownHook
    • run

      public void run()
      Releases the custom h2 lock file used by dependency-check.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread