public static class Node.Builder extends DeploymentEntity.BuilderBase<Node,Deployment.Builder>
name, parentBuilder
Constructor and Description |
---|
Builder(Deployment.Builder parentBuilder,
Node instance)
Constructor
|
Builder(Deployment.Builder parentBuilder,
String name,
String serviceName)
Constructor
|
Builder(Node instance)
Constructor
|
Builder(String name,
String serviceName)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Node.Builder |
applicationPath(String path,
String targetPath)
Adds a not changing local path to the specified absolute target path in the node
|
Node.Builder |
applicationPath(String path,
String targetPath,
Boolean willBeChanged)
Adds a local path to the specified absolute target path in the node
|
Node.Builder |
blockAfter(String eventName,
String stackTraceEventName)
A shortcut method to add a scheduling event to block after the stack trace of the given stack trace event name
|
Node.Builder |
blockBefore(String eventName,
String stackTraceEventName)
A shortcut method to add a scheduling event to block before the stack trace of the given stack trace event name
|
Node |
build()
This method should be implemented by all of the builders and should build the object that this builder is
responsible for
|
Node.Builder |
environmentVariable(String name,
String value)
Adds an environment variable to the node
|
Node.Builder |
garbageCollection(String eventName)
Returns a garbage collection event builder to change an existing garbage collection event object in the deployment definition
with the given garbage collection event name
|
Node.Builder |
garbageCollectionEvent(GarbageCollectionEvent garbageCollectionEvent)
Adds a garbage collection event or changes an existing definition of a garbage collection event with the same name in the
deployment definition
|
GarbageCollectionEvent.Builder |
garbageCollectionEvent(String eventName)
Returns a garbage collection event builder to change an existing garbage collection event object in the deployment
definition with the given garbage collection event name
|
Node.Builder |
initCommand(String initCommand)
Sets the init command for the node which will be executed only once
|
Node.Builder |
logDirectory(String path)
Adds an absolute target path in node's container to be collected as a log directory into the node's local workspace
|
Node.Builder |
logFile(String path)
Adds an absolute target path in node's container to be collected as a log file into the node's local workspace
|
Node.Builder |
offOnStartup()
Mark the node to not be started in the startup
|
protected void |
returnToParent(Node 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
|
Node.Builder |
schedulingEvent(SchedulingEvent schedulingEvent)
Adds a scheduling event or changes an existing definition of a scheduling event with the same name in the
deployment definition
|
SchedulingEvent.Builder |
schedulingEvent(String eventName)
Returns a scheduling event builder to change an existing scheduling event object in the deployment definition
with the given scheduling event name
|
Node.Builder |
stackTrace(String eventName,
String stack)
A shortcut method to add a new stack trace event to the node definition
|
Node.Builder |
stackTrace(String eventName,
String stack,
boolean blockAfter)
A shortcut method to add a new stack trace event to the node definition
|
Node.Builder |
stackTraceEvent(StackTraceEvent stackTraceEvent)
Adds a stack trace event or changes an existing definition of a stack trace event with the same name in the
deployment definition
|
StackTraceEvent.Builder |
stackTraceEvent(String eventName)
Returns a stack trace event builder to change an existing stack trace event object in the deployment definition
with the given stack trace event name
|
Node.Builder |
startCommand(String startCommand)
Sets the start command for the node which will be executed when starting or restarting a node
|
Node.Builder |
stopCommand(String stopCommand)
Sets the stop command for the node which will be executed when stopping or restarting a node
|
Node.Builder |
tcpPort(Integer... portNumber)
Adds a tcp port to be exposed by the node's container
|
Node.Builder |
udpPort(Integer... portNumber)
Adds a udp port to be exposed by the node's container
|
Node.Builder |
unblockAfter(String eventName,
String stackTraceEventName)
A shortcut method to add a scheduling event to unblock after the stack trace of the given stack trace event name
|
Node.Builder |
unblockBefore(String eventName,
String stackTraceEventName)
A shortcut method to add a scheduling event to unblock before the stack trace of the given stack trace event name
|
GarbageCollectionEvent.Builder |
withGarbageCollectionEvent(String name)
Returns a garbage collection event builder to define a new garbage collection event object in the node definition
|
SchedulingEvent.Builder |
withSchedulingEvent(String name)
Returns a scheduling event builder to define a new scheduling event object in the node definition
|
StackTraceEvent.Builder |
withStackTraceEvent(String name)
Returns a stack trace event builder to define a new stack trace event object in the node definition
|
and, getName
public Builder(Deployment.Builder parentBuilder, String name, String serviceName)
parentBuilder
- the parent builder object for this buildername
- the name of the node to be builtserviceName
- the service name for the nodepublic Builder(String name, String serviceName)
name
- the name of the node to be builtserviceName
- the service name for the nodepublic Builder(Deployment.Builder parentBuilder, Node instance)
parentBuilder
- the parent builder object for this builderinstance
- a node object instance to be changedpublic Builder(Node instance)
instance
- a node object instance to be changedpublic StackTraceEvent.Builder withStackTraceEvent(String name)
name
- of the stack trace eventpublic StackTraceEvent.Builder stackTraceEvent(String eventName)
eventName
- the stakc trace event name to be changed through a stack trace event builderDeploymentEntityNotFound
- if a stack trace event object with the given name is not present in the
deployment definitionpublic Node.Builder stackTraceEvent(StackTraceEvent stackTraceEvent)
stackTraceEvent
- definition to be added to the deploymentpublic Node.Builder stackTrace(String eventName, String stack)
eventName
- the name of the stack trace eventstack
- the stack trace for the event which is a set of traces combined with comma where the last method
call comes at the end of stack. For example, a.Class1.m1 calling b.Class2.m2 stack trace should be:
"a.Class1.m1,b.Class2.m2"public Node.Builder stackTrace(String eventName, String stack, boolean blockAfter)
eventName
- the name of the stack trace eventstack
- the stack trace for the event which is a set of traces combined with comma where the last method
call comes at the end of stack. For example, a.Class1.m1 calling b.Class2.m2 stack trace should be:
"a.Class1.m1,b.Class2.m2"blockAfter
- marks the event to be blocked after the last method callpublic SchedulingEvent.Builder withSchedulingEvent(String name)
name
- of the scheduling eventpublic SchedulingEvent.Builder schedulingEvent(String eventName)
eventName
- the scheduling event name to be changed through a scheduling event builderDeploymentEntityNotFound
- if a scheduling event object with the given name is not present in the
deployment definitionpublic Node.Builder schedulingEvent(SchedulingEvent schedulingEvent)
schedulingEvent
- definition to be added to the deploymentpublic Node.Builder blockBefore(String eventName, String stackTraceEventName)
eventName
- the name of scheduling event to be addedstackTraceEventName
- the stack trace event name to be used as the blocking pointpublic Node.Builder blockAfter(String eventName, String stackTraceEventName)
eventName
- the name of scheduling event to be addedstackTraceEventName
- the stack trace event name to be used as the blocking pointpublic Node.Builder unblockBefore(String eventName, String stackTraceEventName)
eventName
- the name of scheduling event to be addedstackTraceEventName
- the stack trace event name to be used as the unblocking pointpublic Node.Builder unblockAfter(String eventName, String stackTraceEventName)
eventName
- the name of scheduling event to be addedstackTraceEventName
- the stack trace event name to be used as the unblocking pointpublic GarbageCollectionEvent.Builder withGarbageCollectionEvent(String name)
name
- of the garbage collection eventpublic GarbageCollectionEvent.Builder garbageCollectionEvent(String eventName)
eventName
- the garbage collection event name to be changed through a garbage collection event builderDeploymentEntityNotFound
- if a garbage collection event object with the given name is not present in the
deployment definitionpublic Node.Builder garbageCollectionEvent(GarbageCollectionEvent garbageCollectionEvent)
garbageCollectionEvent
- definition to be added to the deploymentpublic Node.Builder garbageCollection(String eventName)
eventName
- the garbage collection event name to be changed through a garbage collection event builderDeploymentEntityNotFound
- if a garbage collection event object with the given name is not present in the
deployment definitionpublic Node.Builder offOnStartup()
public Node.Builder initCommand(String initCommand)
initCommand
- the init command of the nodepublic Node.Builder startCommand(String startCommand)
startCommand
- the start command of the nodepublic Node.Builder stopCommand(String stopCommand)
stopCommand
- the stop command of the nodepublic Node.Builder applicationPath(String path, String targetPath)
path
- a local pathtargetPath
- an absolute target path in the node's containerpublic Node.Builder applicationPath(String path, String targetPath, Boolean willBeChanged)
path
- a local pathtargetPath
- an absolute target path in the node's containerwillBeChanged
- a flag to mark the path as changeable which results in a separate copy of the path for
each nodepublic Node.Builder environmentVariable(String name, String value)
name
- the name of the variablevalue
- the value of the variablepublic Node.Builder tcpPort(Integer... portNumber)
portNumber
- the tcp port number to be exposed by the nodepublic Node.Builder udpPort(Integer... portNumber)
portNumber
- the udp port number to be exposed by the nodepublic Node.Builder logFile(String path)
path
- an absolute target log file path to be collectedpublic Node.Builder logDirectory(String path)
path
- an absolute target log directory path to be collectedpublic Node build()
DeploymentEntity.BuilderBase
build
in class DeploymentEntity.BuilderBase<Node,Deployment.Builder>
protected void returnToParent(Node builtObj)
DeploymentEntity.BuilderBase
returnToParent
in class DeploymentEntity.BuilderBase<Node,Deployment.Builder>
Copyright © 2019. All rights reserved.