public class ServiceComponentImpl extends Object implements ServiceComponent
Constructor and Description |
---|
ServiceComponentImpl(Service service,
ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity,
com.google.inject.Injector injector) |
ServiceComponentImpl(Service service,
String componentName,
com.google.inject.Injector injector) |
public ServiceComponentImpl(Service service, String componentName, com.google.inject.Injector injector) throws AmbariException
AmbariException
public ServiceComponentImpl(Service service, ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity, com.google.inject.Injector injector) throws AmbariException
AmbariException
public ReadWriteLock getClusterGlobalLock()
ServiceComponent
getClusterGlobalLock
in interface ServiceComponent
public String getName()
getName
in interface ServiceComponent
public String getServiceName()
getServiceName
in interface ServiceComponent
public long getClusterId()
getClusterId
in interface ServiceComponent
public Map<String,ServiceComponentHost> getServiceComponentHosts()
getServiceComponentHosts
in interface ServiceComponent
public void addServiceComponentHosts(Map<String,ServiceComponentHost> hostComponents) throws AmbariException
addServiceComponentHosts
in interface ServiceComponent
AmbariException
public void addServiceComponentHost(ServiceComponentHost hostComponent) throws AmbariException
addServiceComponentHost
in interface ServiceComponent
AmbariException
public ServiceComponentHost addServiceComponentHost(String hostName) throws AmbariException
addServiceComponentHost
in interface ServiceComponent
AmbariException
public ServiceComponentHost getServiceComponentHost(String hostname) throws AmbariException
getServiceComponentHost
in interface ServiceComponent
AmbariException
public State getDesiredState()
getDesiredState
in interface ServiceComponent
public void setDesiredState(State state)
setDesiredState
in interface ServiceComponent
public StackId getDesiredStackVersion()
getDesiredStackVersion
in interface ServiceComponent
public void setDesiredStackVersion(StackId stackVersion)
setDesiredStackVersion
in interface ServiceComponent
public ServiceComponentResponse convertToResponse()
convertToResponse
in interface ServiceComponent
public String getClusterName()
getClusterName
in interface ServiceComponent
public void debugDump(StringBuilder sb)
debugDump
in interface ServiceComponent
public boolean isPersisted()
isPersisted
in interface ServiceComponent
public void persist()
persist
in interface ServiceComponent
protected void persistEntities()
public void refresh()
refresh
in interface ServiceComponent
public boolean isClientComponent()
isClientComponent
in interface ServiceComponent
public boolean isMasterComponent()
isMasterComponent
in interface ServiceComponent
public boolean canBeRemoved()
canBeRemoved
in interface ServiceComponent
public void deleteAllServiceComponentHosts() throws AmbariException
deleteAllServiceComponentHosts
in interface ServiceComponent
AmbariException
public void deleteServiceComponentHosts(String hostname) throws AmbariException
deleteServiceComponentHosts
in interface ServiceComponent
AmbariException
public void delete() throws AmbariException
delete
in interface ServiceComponent
AmbariException
protected void removeEntities() throws AmbariException
AmbariException
Copyright © 2016. All rights reserved.