forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemoveSwarmNodeCmdImpl.java
More file actions
57 lines (45 loc) · 1.36 KB
/
Copy pathRemoveSwarmNodeCmdImpl.java
File metadata and controls
57 lines (45 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.RemoveSwarmNodeCmd;
import com.github.dockerjava.api.exception.NotFoundException;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Remove a container.
*/
public class RemoveSwarmNodeCmdImpl extends AbstrDockerCmd<RemoveSwarmNodeCmd, Void> implements RemoveSwarmNodeCmd {
private String swarmNodeId;
private Boolean force;
public RemoveSwarmNodeCmdImpl(RemoveSwarmNodeCmd.Exec exec, String containerId) {
super(exec);
withContainerId(containerId);
}
@Override
@CheckForNull
public String getSwarmNodeId() {
return swarmNodeId;
}
@Override
@CheckForNull
public Boolean hasForceEnabled() {
return force;
}
@Override
public RemoveSwarmNodeCmd withContainerId(@Nonnull String swarmNodeId) {
checkNotNull(swarmNodeId, "swarmNodeId was not specified");
this.swarmNodeId = swarmNodeId;
return this;
}
@Override
public RemoveSwarmNodeCmd withForce(Boolean force) {
this.force = force;
return this;
}
/**
* @throws NotFoundException No such swarmNode
*/
@Override
public Void exec() throws NotFoundException {
return super.exec();
}
}