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
AmbariExceptionpublic ServiceComponentImpl(Service service, ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity, com.google.inject.Injector injector) throws AmbariException
AmbariExceptionpublic ReadWriteLock getClusterGlobalLock()
ServiceComponentgetClusterGlobalLock in interface ServiceComponentpublic String getName()
getName in interface ServiceComponentpublic String getServiceName()
getServiceName in interface ServiceComponentpublic long getClusterId()
getClusterId in interface ServiceComponentpublic Map<String,ServiceComponentHost> getServiceComponentHosts()
getServiceComponentHosts in interface ServiceComponentpublic void addServiceComponentHosts(Map<String,ServiceComponentHost> hostComponents) throws AmbariException
addServiceComponentHosts in interface ServiceComponentAmbariExceptionpublic void addServiceComponentHost(ServiceComponentHost hostComponent) throws AmbariException
addServiceComponentHost in interface ServiceComponentAmbariExceptionpublic ServiceComponentHost addServiceComponentHost(String hostName) throws AmbariException
addServiceComponentHost in interface ServiceComponentAmbariExceptionpublic ServiceComponentHost getServiceComponentHost(String hostname) throws AmbariException
getServiceComponentHost in interface ServiceComponentAmbariExceptionpublic State getDesiredState()
getDesiredState in interface ServiceComponentpublic void setDesiredState(State state)
setDesiredState in interface ServiceComponentpublic StackId getDesiredStackVersion()
getDesiredStackVersion in interface ServiceComponentpublic void setDesiredStackVersion(StackId stackVersion)
setDesiredStackVersion in interface ServiceComponentpublic ServiceComponentResponse convertToResponse()
convertToResponse in interface ServiceComponentpublic String getClusterName()
getClusterName in interface ServiceComponentpublic void debugDump(StringBuilder sb)
debugDump in interface ServiceComponentpublic boolean isPersisted()
isPersisted in interface ServiceComponentpublic void persist()
persist in interface ServiceComponentprotected void persistEntities()
public void refresh()
refresh in interface ServiceComponentpublic boolean isClientComponent()
isClientComponent in interface ServiceComponentpublic boolean isMasterComponent()
isMasterComponent in interface ServiceComponentpublic boolean canBeRemoved()
canBeRemoved in interface ServiceComponentpublic void deleteAllServiceComponentHosts()
throws AmbariException
deleteAllServiceComponentHosts in interface ServiceComponentAmbariExceptionpublic void deleteServiceComponentHosts(String hostname) throws AmbariException
deleteServiceComponentHosts in interface ServiceComponentAmbariExceptionpublic void delete()
throws AmbariException
delete in interface ServiceComponentAmbariExceptionprotected void removeEntities()
throws AmbariException
AmbariExceptionCopyright © 2016. All rights reserved.