Package org.apache.flink.util
Class NetUtils.Port
- java.lang.Object
-
- org.apache.flink.util.NetUtils.Port
-
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- NetUtils
public static class NetUtils.Port extends Object implements AutoCloseable
Port wrapper class which holds aFileLockuntil it releases. Used to avoid race condition among multiple threads/processes.
-
-
Constructor Detail
-
Port
public Port(int port, FileLock fileLock) throws IOException- Throws:
IOException
-
-
Method Detail
-
getPort
public int getPort()
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-