Class HostRegistrationInMemory

java.lang.Object
org.opencastproject.serviceregistry.api.HostRegistrationInMemory
All Implemented Interfaces:
HostRegistration

public class HostRegistrationInMemory extends Object implements HostRegistration
  • Constructor Details

    • HostRegistrationInMemory

      public HostRegistrationInMemory(String baseUrl, String address, String nodeName, float maxLoad, int cores, long memory)
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: HostRegistration
      Returns an identifier for this host.
      Specified by:
      getId in interface HostRegistration
      Returns:
      Host identifier
    • getBaseUrl

      public String getBaseUrl()
      Specified by:
      getBaseUrl in interface HostRegistration
      Returns:
      the baseUrl for this host
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
      Specified by:
      setBaseUrl in interface HostRegistration
      Parameters:
      baseUrl - the baseUrl to set
    • getMaxLoad

      public float getMaxLoad()
      Specified by:
      getMaxLoad in interface HostRegistration
      Returns:
      the maxLoad
    • setMaxLoad

      public void setMaxLoad(float maxLoad)
      Specified by:
      setMaxLoad in interface HostRegistration
      Parameters:
      maxLoad - the maxLoad to set
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface HostRegistration
      Returns:
      whether this host is active
    • setActive

      public void setActive(boolean active)
      Specified by:
      setActive in interface HostRegistration
      Parameters:
      active - the active status to set
    • isOnline

      public boolean isOnline()
      Specified by:
      isOnline in interface HostRegistration
      Returns:
      whether this host is online
    • setOnline

      public void setOnline(boolean online)
      Specified by:
      setOnline in interface HostRegistration
      Parameters:
      online - the online status to set
    • isMaintenanceMode

      public boolean isMaintenanceMode()
      Specified by:
      isMaintenanceMode in interface HostRegistration
      Returns:
      the maintenanceMode
    • setMaintenanceMode

      public void setMaintenanceMode(boolean maintenanceMode)
      Specified by:
      setMaintenanceMode in interface HostRegistration
      Parameters:
      maintenanceMode - the maintenanceMode to set
    • getIpAddress

      public String getIpAddress()
      Specified by:
      getIpAddress in interface HostRegistration
      Returns:
      the IP address for this host
    • setIpAddress

      public void setIpAddress(String address)
      Specified by:
      setIpAddress in interface HostRegistration
      Parameters:
      address - the IP address to set
    • getMemory

      public long getMemory()
      Specified by:
      getMemory in interface HostRegistration
      Returns:
      the allocated memory of this host
    • setMemory

      public void setMemory(long memory)
      Specified by:
      setMemory in interface HostRegistration
      Parameters:
      memory - the memory to set
    • getCores

      public int getCores()
      Specified by:
      getCores in interface HostRegistration
      Returns:
      the available cores of this host
    • setCores

      public void setCores(int cores)
      Specified by:
      setCores in interface HostRegistration
      Parameters:
      cores - the cores to set
    • getNodeName

      public String getNodeName()
      Specified by:
      getNodeName in interface HostRegistration
      Returns:
      the node name for this host or null, if not set
    • setNodeName

      public void setNodeName(String nodeName)
      Specified by:
      setNodeName in interface HostRegistration
      Parameters:
      nodeName - the node name to set