Package org.elasticsearch.env
Class NodeEnvironment.NodeLock
- java.lang.Object
-
- org.elasticsearch.env.NodeEnvironment.NodeLock
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
- Enclosing class:
- NodeEnvironment
public static class NodeEnvironment.NodeLock extends Object implements Releasable
-
-
Constructor Summary
Constructors Constructor Description NodeLock(int nodeId, org.apache.logging.log4j.Logger logger, Environment environment, CheckedFunction<Path,Boolean,IOException> pathFunction)Tries to acquire a node lock for a node id, throwsIOExceptionif it is unable to acquire it
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()NodeEnvironment.NodePath[]getNodePaths()
-
-
-
Constructor Detail
-
NodeLock
public NodeLock(int nodeId, org.apache.logging.log4j.Logger logger, Environment environment, CheckedFunction<Path,Boolean,IOException> pathFunction) throws IOExceptionTries to acquire a node lock for a node id, throwsIOExceptionif it is unable to acquire it- Parameters:
pathFunction- function to check node path before attempt of acquiring a node lock- Throws:
IOException
-
-
Method Detail
-
getNodePaths
public NodeEnvironment.NodePath[] getNodePaths()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
-