Skip to content

Commit 79a6b60

Browse files
committed
Add Memory, MemorySwap and CpuShares mappings to HostConfig
1 parent 5d6d95c commit 79a6b60

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/main/java/com/github/dockerjava/api/model/HostConfig.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ public class HostConfig {
6666
@JsonProperty("Ulimits")
6767
private Ulimit[] ulimits;
6868

69+
@JsonProperty("Memory")
70+
private long memoryLimit = 0;
71+
72+
@JsonProperty("MemorySwap")
73+
private long memorySwap = 0;
74+
75+
@JsonProperty("CpuShares")
76+
private int cpuShares = 0;
77+
6978
public HostConfig() {
7079
}
7180

@@ -173,6 +182,18 @@ public Ulimit[] getUlimits() {
173182
return ulimits;
174183
}
175184

185+
public long getMemoryLimit() {
186+
return memoryLimit;
187+
}
188+
189+
public long getMemorySwap() {
190+
return memorySwap;
191+
}
192+
193+
public int getCpuShares() {
194+
return cpuShares;
195+
}
196+
176197
@JsonIgnore
177198
public void setBinds(Bind... binds) {
178199
this.binds = new Binds(binds);

0 commit comments

Comments
 (0)