Class PortManager

java.lang.Object
org.apache.pulsar.common.util.PortManager

public class PortManager extends Object
  • Constructor Details

    • PortManager

      public PortManager()
  • Method Details

    • nextLockedFreePort

      public static int nextLockedFreePort()
      Return a locked available port.
      Returns:
      locked available port.
    • releaseLockedPort

      public static boolean releaseLockedPort(int lockedPort)
      Returns whether the port was released successfully.
      Returns:
      whether the release is successful.
    • checkPortIfLocked

      public static boolean checkPortIfLocked(int lockedPort)
      Check port if locked.
      Returns:
      whether the port is locked.