public class ServiceComponentHostImpl extends Object implements ServiceComponentHost
Constructor and Description |
---|
ServiceComponentHostImpl(ServiceComponent serviceComponent,
HostComponentStateEntity stateEntity,
HostComponentDesiredStateEntity desiredStateEntity,
com.google.inject.Injector injector) |
ServiceComponentHostImpl(ServiceComponent serviceComponent,
String hostName,
com.google.inject.Injector injector) |
public ServiceComponentHostImpl(ServiceComponent serviceComponent, String hostName, com.google.inject.Injector injector)
public ServiceComponentHostImpl(ServiceComponent serviceComponent, HostComponentStateEntity stateEntity, HostComponentDesiredStateEntity desiredStateEntity, com.google.inject.Injector injector)
public State getState()
getState
in interface ServiceComponentHost
public void setState(State state)
setState
in interface ServiceComponentHost
public void handleEvent(ServiceComponentHostEvent event) throws InvalidStateTransitionException
ServiceComponentHost
handleEvent
in interface ServiceComponentHost
event
- Event to handleInvalidStateTransitionException
public String getServiceComponentName()
ServiceComponentHost
getServiceComponentName
in interface ServiceComponentHost
public String getHostName()
ServiceComponentHost
getHostName
in interface ServiceComponentHost
public long getLastOpStartTime()
public void setLastOpStartTime(long lastOpStartTime)
lastOpStartTime
- the lastOpStartTime to setpublic long getLastOpEndTime()
public void setLastOpEndTime(long lastOpEndTime)
lastOpEndTime
- the lastOpEndTime to setpublic long getLastOpLastUpdateTime()
public void setLastOpLastUpdateTime(long lastOpLastUpdateTime)
lastOpLastUpdateTime
- the lastOpLastUpdateTime to setpublic long getClusterId()
ServiceComponentHost
getClusterId
in interface ServiceComponentHost
public String getServiceName()
ServiceComponentHost
getServiceName
in interface ServiceComponentHost
public StackId getStackVersion()
getStackVersion
in interface ServiceComponentHost
public void setStackVersion(StackId stackVersion)
setStackVersion
in interface ServiceComponentHost
public State getDesiredState()
getDesiredState
in interface ServiceComponentHost
public void setDesiredState(State state)
setDesiredState
in interface ServiceComponentHost
public StackId getDesiredStackVersion()
getDesiredStackVersion
in interface ServiceComponentHost
public void setDesiredStackVersion(StackId stackVersion)
setDesiredStackVersion
in interface ServiceComponentHost
public HostComponentAdminState getComponentAdminState()
getComponentAdminState
in interface ServiceComponentHost
public void setComponentAdminState(HostComponentAdminState attribute)
setComponentAdminState
in interface ServiceComponentHost
public ServiceComponentHostResponse convertToResponse()
convertToResponse
in interface ServiceComponentHost
public String getClusterName()
ServiceComponentHost
getClusterName
in interface ServiceComponentHost
public void debugDump(StringBuilder sb)
debugDump
in interface ServiceComponentHost
public boolean isPersisted()
isPersisted
in interface ServiceComponentHost
public void persist()
persist
in interface ServiceComponentHost
protected void persistEntities()
public void refresh()
refresh
in interface ServiceComponentHost
public boolean canBeRemoved()
canBeRemoved
in interface ServiceComponentHost
public void delete()
delete
in interface ServiceComponentHost
protected void removeEntities()
public void updateActualConfigs(Map<String,Map<String,String>> configTags)
ServiceComponentHost
updateActualConfigs
in interface ServiceComponentHost
public Map<String,HostConfig> getActualConfigs()
ServiceComponentHost
getActualConfigs
in interface ServiceComponentHost
public HostState getHostState()
getHostState
in interface ServiceComponentHost
public void setMaintenanceState(MaintenanceState state)
setMaintenanceState
in interface ServiceComponentHost
state
- the maintenance statepublic MaintenanceState getMaintenanceState()
getMaintenanceState
in interface ServiceComponentHost
Copyright © 2014. All rights reserved.