Class PortFinder


  • public class PortFinder
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PortFinder​(java.util.Collection<com.yahoo.config.provision.NetworkPorts.Allocation> allocations)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<com.yahoo.config.provision.NetworkPorts.Allocation> allocations()  
      int findPort​(com.yahoo.config.provision.NetworkPorts.Allocation request, java.lang.String host)  
      boolean isFree​(int port)  
      void use​(com.yahoo.config.provision.NetworkPorts.Allocation allocation)
      force add the given allocation, removing any conflicting ones
      • Methods inherited from class java.lang.Object

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

      • PortFinder

        public PortFinder​(java.util.Collection<com.yahoo.config.provision.NetworkPorts.Allocation> allocations)
    • Method Detail

      • use

        public void use​(com.yahoo.config.provision.NetworkPorts.Allocation allocation)
        force add the given allocation, removing any conflicting ones
      • findPort

        public int findPort​(com.yahoo.config.provision.NetworkPorts.Allocation request,
                            java.lang.String host)
      • isFree

        public boolean isFree​(int port)
      • allocations

        public java.util.Collection<com.yahoo.config.provision.NetworkPorts.Allocation> allocations()