Class YamlService
java.lang.Object
de.iip_ecosphere.platform.services.environment.AbstractYamlService
de.iip_ecosphere.platform.services.spring.yaml.YamlService
- All Implemented Interfaces:
Service
public class YamlService
extends de.iip_ecosphere.platform.services.environment.AbstractYamlService
implements Service
Information about a single service.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate longprivate Stringprivate intprivate longprivate List<YamlTypedData> private YamlProcessprivate List<YamlRelation> Fields inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Service
PROTOCOL_PLACEHOLDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns additional/optional command line arguments required to start the service.Returns additional/optional command line arguments required to start the service.intgetCpus()Returns the desired number of CPUs for instances of this service.longgetDisk()Returns the desired disk space for instances of this service.Returns the service id of the ensemble leader.intReturns the desired number of instances of this service to be started in the same process.longReturns the desired memory for instances of this service.Returns the service-specific configurable parameters.Returns an optional attached process realizing the service.Returns the service-specific relations and command line arguments.voidDefines the command line arguments.voidsetCpus(int cpus) Defines the desired number of CPUs for instances of this service.voidsetDisk(long disk) Defines the desired disk space for instances of this service.voidsetEnsembleWith(String ensembleWith) Defines the service id of the ensemble leader starting this service.voidsetInstances(int instances) Defines the desired number of instances of this service to be started in the same process.voidsetMemory(long memory) Defines the desired memory for instances of this service.voidsetParameters(List<YamlTypedData> parameters) Defines the service-specific configurable parameter.voidsetProcess(YamlProcess process) Defines an optional attached process realizing the service.voidsetRelations(List<YamlRelation> relations) Defines the service-specific relations and command line arguments.Methods inherited from class de.iip_ecosphere.platform.services.environment.AbstractYamlService
getApplicationId, getApplicationInstanceId, getDescription, getId, getKind, getName, getNetMgtKey, getServiceId, getTransportChannel, getVersion, isDeployable, isTopLevel, setApplicationId, setDeployable, setDescription, setId, setKind, setName, setNetMgtKey, setTopLevel, setTransportChannel, setVersionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.services.spring.descriptor.Service
getApplicationId, getApplicationInstanceId, getDescription, getId, getKind, getName, getNetMgtKey, getVersion, isDeployable, isTopLevel
-
Field Details
-
cmdArg
-
ensembleWith
-
relations
-
parameters
-
process
-
instances
private int instances -
memory
private long memory -
disk
private long disk -
cpus
private int cpus
-
-
Constructor Details
-
YamlService
public YamlService()
-
-
Method Details
-
getCmdArg
Description copied from interface:ServiceReturns additional/optional command line arguments required to start the service. Placeholders are not replaced. -
getCmdArg
Description copied from interface:ServiceReturns additional/optional command line arguments required to start the service. The port placeholderEndpoint.PORT_PLACEHOLDERwill be replaced with the command port the platform is using to send administrative commands to the service (seeService). SimilarlyService.PROTOCOL_PLACEHOLDERwill be replaced with the AASprotocol. -
getEnsembleWith
Description copied from interface:ServiceReturns the service id of the ensemble leader. The ensemble services shall then be started on its own.- Specified by:
getEnsembleWithin interfaceService- Returns:
- the service id of the ensemble leader (may be null for none)
-
getRelations
Description copied from interface:ServiceReturns the service-specific relations and command line arguments.- Specified by:
getRelationsin interfaceService- Returns:
- the relations, may be empty
-
getParameters
Description copied from interface:ServiceReturns the service-specific configurable parameters.- Specified by:
getParametersin interfaceService- Returns:
- the parameter, may be empty
-
getProcess
Description copied from interface:ServiceReturns an optional attached process realizing the service.- Specified by:
getProcessin interfaceService- Returns:
- the process information, may be null
-
getInstances
public int getInstances()Description copied from interface:ServiceReturns the desired number of instances of this service to be started in the same process. This property is considered during deployment only if the deployer supports it.- Specified by:
getInstancesin interfaceService- Returns:
- the number of instances, ignored if not positive
-
getMemory
public long getMemory()Description copied from interface:ServiceReturns the desired memory for instances of this service. This property is considered during deployment only if the deployer supports it. -
getDisk
public long getDisk()Description copied from interface:ServiceReturns the desired disk space for instances of this service. This property is considered during deployment only if the deployer supports it. -
getCpus
public int getCpus()Description copied from interface:ServiceReturns the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it. -
setCmdArg
Defines the command line arguments. [required by SnakeYaml]- Parameters:
cmdArg- the command line arguments (may be empty for none)
-
setEnsembleWith
Defines the service id of the ensemble leader starting this service. [required by SnakeYaml]- Parameters:
ensembleWith- the service id of the ensemble leader (may be null for none)
-
setRelations
Defines the service-specific relations and command line arguments. [required by SnakeYaml]- Parameters:
relations- the relations, may be empty
-
setParameters
Defines the service-specific configurable parameter. [required by SnakeYaml]- Parameters:
parameters- the parameters, may be empty
-
setProcess
Defines an optional attached process realizing the service. [required by SnakeYaml]- Parameters:
process- the process information, may be null
-
setInstances
public void setInstances(int instances) Defines the desired number of instances of this service to be started in the same process. This property is considered during deployment only if the deployer supports it.- Parameters:
instances- the number of instances, ignored if not positive
-
setMemory
public void setMemory(long memory) Defines the desired memory for instances of this service. This property is considered during deployment only if the deployer supports it.- Parameters:
memory- the desired memory in Mebibytes (i.e., "m"), ignored if not positive
-
setDisk
public void setDisk(long disk) Defines the desired disk space for instances of this service. This property is considered during deployment only if the deployer supports it.- Parameters:
disk- the desired disk space in Mebibytes (i.e., "m"), ignored if not positive
-
setCpus
public void setCpus(int cpus) Defines the desired number of CPUs for instances of this service. This property is considered during deployment only if the deployer supports it.- Parameters:
cpus- the desired number of CPUs , ignored if not positive
-