public class ModuleDeploymentStatus
extends java.lang.Object
get...
methods, this class provides a toMap()
method which returns a map that contains the state and error
description which can be written to ZooKeeper. The module deployment
status path can be obtained via buildPath()
.Modifier and Type | Class and Description |
---|---|
static class |
ModuleDeploymentStatus.State
Module deployment states.
|
Constructor and Description |
---|
ModuleDeploymentStatus(java.lang.String container,
int moduleSequence,
ModuleDescriptor.Key key,
java.util.Map<java.lang.String,java.lang.String> map)
Construct a
ModuleDeploymentStatus . |
ModuleDeploymentStatus(java.lang.String container,
int moduleSequence,
ModuleDescriptor.Key key,
ModuleDeploymentStatus.State state,
java.lang.String errorDescription)
Construct a
ModuleDeploymentStatus . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildPath()
Return the ZooKeeper path that this module deployment
status should be written to
|
java.lang.String |
getContainer() |
java.lang.String |
getErrorDescription() |
ModuleDescriptor.Key |
getKey() |
int |
getModuleSequence() |
java.lang.String |
getModuleSequenceAsString() |
ModuleDeploymentStatus.State |
getState() |
java.util.Map<java.lang.String,java.lang.String> |
toMap()
Return a map containing the state and error description
(if any) for this status.
|
java.lang.String |
toString() |
public ModuleDeploymentStatus(java.lang.String container, int moduleSequence, ModuleDescriptor.Key key, ModuleDeploymentStatus.State state, java.lang.String errorDescription)
ModuleDeploymentStatus
.container
- target container namemoduleSequence
- module sequence numberkey
- module descriptor keystate
- deployment stateerrorDescription
- error description (may be null)public ModuleDeploymentStatus(java.lang.String container, int moduleSequence, ModuleDescriptor.Key key, java.util.Map<java.lang.String,java.lang.String> map)
ModuleDeploymentStatus
.container
- target container namemoduleSequence
- module sequence numberkey
- module descriptor keymap
- map containing status and (possibly) an error descriptionpublic java.lang.String getContainer()
container
public int getModuleSequence()
moduleSequence
public java.lang.String getModuleSequenceAsString()
moduleSequence
public ModuleDescriptor.Key getKey()
key
public ModuleDeploymentStatus.State getState()
state
public java.lang.String getErrorDescription()
errorDescription
public java.util.Map<java.lang.String,java.lang.String> toMap()
buildPath()
public java.lang.String buildPath()
toMap()
public java.lang.String toString()
toString
in class java.lang.Object