Skip to content

Commit b9d2835

Browse files
author
Marcus Linke
committed
Merge branch '2.x'
2 parents 2638cec + f790036 commit b9d2835

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

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

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Map;
44

5+
import javax.annotation.CheckForNull;
6+
57
import org.apache.commons.lang.builder.ToStringBuilder;
68

79
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -19,8 +21,19 @@ public class Statistics {
1921
@JsonProperty("read")
2022
private String read;
2123

24+
/**
25+
* @since Docker Remote API 1.21
26+
*/
27+
@CheckForNull
28+
@JsonProperty("networks")
29+
private Map<String, Object> networks;
30+
31+
/**
32+
* @deprecated as of Docker Remote API 1.21, replaced by {@link #networks}
33+
*/
34+
@Deprecated
2235
@JsonProperty("network")
23-
private Map<String, Object> networkStats;
36+
private Map<String, Object> network;
2437

2538
@JsonProperty("memory_stats")
2639
private Map<String, Object> memoryStats;
@@ -31,8 +44,20 @@ public class Statistics {
3144
@JsonProperty("cpu_stats")
3245
private Map<String, Object> cpuStats;
3346

34-
public Map<String, Object> getNetworkStats() {
35-
return networkStats;
47+
/**
48+
* @since Docker Remote API 1.21
49+
*/
50+
@CheckForNull
51+
public Map<String, Object> getNetworks() {
52+
return networks;
53+
}
54+
55+
/**
56+
* @deprecated as of Docker Remote API 1.21, replaced by {@link #getNetworks()}
57+
*/
58+
@Deprecated
59+
public Map<String, Object> getNetwork() {
60+
return network;
3661
}
3762

3863
public Map<String, Object> getCpuStats() {

0 commit comments

Comments
 (0)