public static class Service.Builder extends DeploymentEntity.BuilderBase<Service,Deployment.Builder>
name, parentBuilder
Constructor and Description |
---|
Builder(Deployment.Builder parentBuilder,
Service instance)
Constructor
|
Builder(Deployment.Builder parentBuilder,
String name)
Constructor
|
Builder(Service instance)
Constructor
|
Builder(String name)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Service.Builder |
applicationPath(String path,
String targetPath,
PathAttr... pathAttrs)
Adds a local path to the specified absolute target path in the node created out of this service
|
Service |
build()
This method should be implemented by all of the builders and should build the object that this builder is
responsible for
|
Service.Builder |
dockerFileAddress(String dockerFileAddress,
Boolean forceBuild)
Sets the Dockerfile address to be used to build the docker image for this service
|
Service.Builder |
dockerImageName(String dockerImage)
Sets the docker image name and tag to be used for this service.
|
Service.Builder |
environmentVariable(String name,
String value)
Adds an environment variable to the service
|
Service.Builder |
initCommand(String initCommand)
Sets the init command for the service which will be executed only once
|
Service.Builder |
instrumentablePath(String instrumentablePath)
Adds an instrumentable path to the service.
|
Service.Builder |
libraryPath(String path)
Marks an absolute target path in container of a node created out of this service as a library path.
|
Service.Builder |
logDirectory(String path)
Adds an absolute target path in the container of the node created out of this service to be collected as a
log file into the node's local workspace
|
Service.Builder |
logFile(String path)
Adds an absolute target path in the container of the node created out of this service to be collected as a
log file into the node's local workspace
|
protected void |
returnToParent(Service builtObj)
This method should be implemented by all of the builders and should call a method in the parent builder to add
the built object to the parent builder
|
Service.Builder |
serviceType(ServiceType serviceType)
Sets the programming language of the service to be used by the instrumentation engine
|
Service.Builder |
startCommand(String startCommand)
Sets the start command for the service which will be executed only once
|
Service.Builder |
stopCommand(String stopCommand)
Sets the stop command for the service which will be executed only once
|
Service.Builder |
tcpPort(Integer... portNumber)
Adds a tcp port to be exposed by the container of a node created out of this service
|
Service.Builder |
udpPort(Integer... portNumber)
Adds a udp port to be exposed by the container of a node created out of this service
|
and, getName
public Builder(Deployment.Builder parentBuilder, String name)
parentBuilder
- the parent builder object for this buildername
- the name of the service to be builtpublic Builder(String name)
name
- the name of the service to be builtpublic Builder(Deployment.Builder parentBuilder, Service instance)
parentBuilder
- the parent builder object for this builderinstance
- a service object instance to be changedpublic Builder(Service instance)
instance
- a service object instance to be changedpublic Service.Builder dockerImageName(String dockerImage)
dockerImage
- the docker image name and tagpublic Service.Builder dockerFileAddress(String dockerFileAddress, Boolean forceBuild)
dockerFileAddress
- forceBuild
- public Service.Builder instrumentablePath(String instrumentablePath)
instrumentablePath
- an absolute target path in the container of a node created out of this this service to
be marked as instrumentablepublic Service.Builder startCommand(String startCommand)
startCommand
- the start command of the servicepublic Service.Builder initCommand(String initCommand)
initCommand
- the init command of the servicepublic Service.Builder stopCommand(String stopCommand)
stopCommand
- the stop command of the servicepublic Service.Builder serviceType(ServiceType serviceType)
serviceType
- the programming language of the servicepublic Service.Builder applicationPath(String path, String targetPath, PathAttr... pathAttrs)
path
- a local pathtargetPath
- an absolute target path in the container of the node created out of this servicepathAttrs
- the attributes of the path. PathAttr.LIBRARY marks the path as a library to be used by the
instrumentation engine. PathAttr.COMPRESSED marks the path as compressed to be decompressed
before being added to the node created out of this service. PathAttr.CHANGEABLE marks the path
as changeable which results in a separate copy of the path for each node.public Service.Builder libraryPath(String path)
path
- an absolute or wildcard target path to be marked as a library pathpublic Service.Builder logFile(String path)
path
- an absolute target log file path to be collectedpublic Service.Builder logDirectory(String path)
path
- an absolute target log file path to be collectedpublic Service.Builder environmentVariable(String name, String value)
name
- the name of the variablevalue
- the value of the variablepublic Service.Builder tcpPort(Integer... portNumber)
portNumber
- the tcp port number to be exposedpublic Service.Builder udpPort(Integer... portNumber)
portNumber
- the udp port number to be exposedpublic Service build()
DeploymentEntity.BuilderBase
build
in class DeploymentEntity.BuilderBase<Service,Deployment.Builder>
protected void returnToParent(Service builtObj)
DeploymentEntity.BuilderBase
returnToParent
in class DeploymentEntity.BuilderBase<Service,Deployment.Builder>
Copyright © 2019. All rights reserved.