Class HostRegistrationInMemory
java.lang.Object
org.opencastproject.serviceregistry.api.HostRegistrationInMemory
- All Implemented Interfaces:
HostRegistration
-
Constructor Summary
ConstructorsConstructorDescriptionHostRegistrationInMemory(String baseUrl, String address, String nodeName, float maxLoad, int cores, long memory) -
Method Summary
Modifier and TypeMethodDescriptionintgetCores()getId()Returns an identifier for this host.floatlongbooleanisActive()booleanbooleanisOnline()voidsetActive(boolean active) voidsetBaseUrl(String baseUrl) voidsetCores(int cores) voidsetIpAddress(String address) voidsetMaintenanceMode(boolean maintenanceMode) voidsetMaxLoad(float maxLoad) voidsetMemory(long memory) voidsetNodeName(String nodeName) voidsetOnline(boolean online)
-
Constructor Details
-
HostRegistrationInMemory
-
-
Method Details
-
getId
Description copied from interface:HostRegistrationReturns an identifier for this host.- Specified by:
getIdin interfaceHostRegistration- Returns:
- Host identifier
-
getBaseUrl
- Specified by:
getBaseUrlin interfaceHostRegistration- Returns:
- the baseUrl for this host
-
setBaseUrl
- Specified by:
setBaseUrlin interfaceHostRegistration- Parameters:
baseUrl- the baseUrl to set
-
getMaxLoad
public float getMaxLoad()- Specified by:
getMaxLoadin interfaceHostRegistration- Returns:
- the maxLoad
-
setMaxLoad
public void setMaxLoad(float maxLoad) - Specified by:
setMaxLoadin interfaceHostRegistration- Parameters:
maxLoad- the maxLoad to set
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceHostRegistration- Returns:
- whether this host is active
-
setActive
public void setActive(boolean active) - Specified by:
setActivein interfaceHostRegistration- Parameters:
active- the active status to set
-
isOnline
public boolean isOnline()- Specified by:
isOnlinein interfaceHostRegistration- Returns:
- whether this host is online
-
setOnline
public void setOnline(boolean online) - Specified by:
setOnlinein interfaceHostRegistration- Parameters:
online- the online status to set
-
isMaintenanceMode
public boolean isMaintenanceMode()- Specified by:
isMaintenanceModein interfaceHostRegistration- Returns:
- the maintenanceMode
-
setMaintenanceMode
public void setMaintenanceMode(boolean maintenanceMode) - Specified by:
setMaintenanceModein interfaceHostRegistration- Parameters:
maintenanceMode- the maintenanceMode to set
-
getIpAddress
- Specified by:
getIpAddressin interfaceHostRegistration- Returns:
- the IP address for this host
-
setIpAddress
- Specified by:
setIpAddressin interfaceHostRegistration- Parameters:
address- the IP address to set
-
getMemory
public long getMemory()- Specified by:
getMemoryin interfaceHostRegistration- Returns:
- the allocated memory of this host
-
setMemory
public void setMemory(long memory) - Specified by:
setMemoryin interfaceHostRegistration- Parameters:
memory- the memory to set
-
getCores
public int getCores()- Specified by:
getCoresin interfaceHostRegistration- Returns:
- the available cores of this host
-
setCores
public void setCores(int cores) - Specified by:
setCoresin interfaceHostRegistration- Parameters:
cores- the cores to set
-
getNodeName
- Specified by:
getNodeNamein interfaceHostRegistration- Returns:
- the node name for this host or null, if not set
-
setNodeName
- Specified by:
setNodeNamein interfaceHostRegistration- Parameters:
nodeName- the node name to set
-