Class 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

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • PidFileLocker

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

      • 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