Class NodeEnvironment.NodeLock

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Releasable
    Enclosing class:
    NodeEnvironment

    public static class NodeEnvironment.NodeLock
    extends java.lang.Object
    implements Releasable
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeLock​(int nodeId, org.apache.logging.log4j.Logger logger, Environment environment, CheckedFunction<java.nio.file.Path,​java.lang.Boolean,​java.io.IOException> pathFunction)
      Tries to acquire a node lock for a node id, throws IOException if it is unable to acquire it
    • Method Summary

      Modifier and Type Method Description
      void close()  
      NodeEnvironment.NodePath[] getNodePaths()  
      • Methods inherited from class java.lang.Object

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

      • NodeLock

        public NodeLock​(int nodeId,
                        org.apache.logging.log4j.Logger logger,
                        Environment environment,
                        CheckedFunction<java.nio.file.Path,​java.lang.Boolean,​java.io.IOException> pathFunction)
                 throws java.io.IOException
        Tries to acquire a node lock for a node id, throws IOException if it is unable to acquire it
        Parameters:
        pathFunction - function to check node path before attempt of acquiring a node lock
        Throws:
        java.io.IOException
    • Method Detail

      • close

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