Class PidFileLocker

java.lang.Object
org.bkvm.daemons.PidFileLocker
All Implemented Interfaces:
java.lang.AutoCloseable

public class PidFileLocker
extends java.lang.Object
implements java.lang.AutoCloseable
Lock sul pid file, per evitare avvii concorrenti del servizio
Author:
enrico.olivelli
  • Constructor Summary

    Constructors 
    Constructor Description
    PidFileLocker​(java.nio.file.Path basePath)  
  • Method Summary

    Modifier and Type Method Description
    void check()  
    void close()  
    void lock()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PidFileLocker

      public PidFileLocker​(java.nio.file.Path basePath)
  • Method Details

    • lock

      public void lock() throws java.io.IOException
      Throws:
      java.io.IOException
    • check

      public void check() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable