Class CentralDeploySentinel.Builder
java.lang.Object
network.ike.plugin.CentralDeploySentinel.Builder
- Enclosing class:
CentralDeploySentinel
Fluent builder for
CentralDeploySentinel. Required
fields (state, artifactId, version, started, path)
are validated by build(); the rest are optional
and default to their type's zero / null.-
Method Summary
Modifier and TypeMethodDescriptionartifactId(String v) Set the project artifactId.attempts(int v) Set the number of attempts taken.build()Validate required fields and build the immutable sentinel value.Set the finish instant; passnullfor a sentinel still inCentralDeploySentinel.State.PENDING.Set the failure summary; passnullwhen not failed.Set the deploy-log file path.maxAttempts(int v) Set the configured maximum attempts.Set the advisory note; passnullwhen none.Set the sentinel-file path on disk.pid(long v) Set the subprocess PID.Set the start instant.Set the lifecycle state.Set the release version.
-
Method Details
-
state
Set the lifecycle state.- Parameters:
v- lifecycle state (must not benull)- Returns:
- this builder for chaining
-
artifactId
Set the project artifactId.- Parameters:
v- project artifactId- Returns:
- this builder for chaining
-
version
Set the release version.- Parameters:
v- release version- Returns:
- this builder for chaining
-
started
Set the start instant.- Parameters:
v- start instant (UTC)- Returns:
- this builder for chaining
-
finished
Set the finish instant; passnullfor a sentinel still inCentralDeploySentinel.State.PENDING.- Parameters:
v- finish instant, ornullif pending- Returns:
- this builder for chaining
-
attempts
Set the number of attempts taken.- Parameters:
v- attempts taken so far- Returns:
- this builder for chaining
-
maxAttempts
Set the configured maximum attempts.- Parameters:
v- configured max attempts- Returns:
- this builder for chaining
-
lastError
Set the failure summary; passnullwhen not failed.- Parameters:
v- failure summary, ornull- Returns:
- this builder for chaining
-
logFile
Set the deploy-log file path.- Parameters:
v- deploy log file path- Returns:
- this builder for chaining
-
pid
Set the subprocess PID.- Parameters:
v- subprocess PID, or 0 if not recorded- Returns:
- this builder for chaining
-
note
Set the advisory note; passnullwhen none.- Parameters:
v- advisory note, ornull- Returns:
- this builder for chaining
-
path
Set the sentinel-file path on disk. Required.- Parameters:
v- sentinel file path- Returns:
- this builder for chaining
-
build
Validate required fields and build the immutable sentinel value.- Returns:
- the built immutable sentinel
- Throws:
IllegalStateException- if any required field (state, artifactId, version, started, path) is unset
-