public class Volume extends Object implements Serializable, Cloneable
A data volume used in a task definition.
| Constructor and Description |
|---|
Volume() |
| Modifier and Type | Method and Description |
|---|---|
Volume |
clone() |
boolean |
equals(Object obj) |
HostVolumeProperties |
getHost()
The path on the host container instance that is presented to the
containers which access the volume.
|
String |
getName()
The name of the volume.
|
int |
hashCode() |
void |
setHost(HostVolumeProperties host)
The path on the host container instance that is presented to the
containers which access the volume.
|
void |
setName(String name)
The name of the volume.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Volume |
withHost(HostVolumeProperties host)
The path on the host container instance that is presented to the
containers which access the volume.
|
Volume |
withName(String name)
The name of the volume.
|
public String getName()
sourceVolume parameter of container definition
mountPoints.sourceVolume parameter of container definition
mountPoints.public void setName(String name)
sourceVolume parameter of container definition
mountPoints.name - The name of the volume. This name is referenced in the
sourceVolume parameter of container definition
mountPoints.public Volume withName(String name)
sourceVolume parameter of container definition
mountPoints.
Returns a reference to this object so that method calls can be chained together.
name - The name of the volume. This name is referenced in the
sourceVolume parameter of container definition
mountPoints.public HostVolumeProperties getHost()
public void setHost(HostVolumeProperties host)
host - The path on the host container instance that is presented to the
containers which access the volume. If this parameter is empty, then
the Docker daemon assigns a host path for you.public Volume withHost(HostVolumeProperties host)
Returns a reference to this object so that method calls can be chained together.
host - The path on the host container instance that is presented to the
containers which access the volume. If this parameter is empty, then
the Docker daemon assigns a host path for you.public String toString()
toString in class ObjectObject.toString()Copyright © 2015. All rights reserved.