Deprecate "network" and enable "networks" stats (remote Docker API 1.21) (branch 2.x) by bonigarcia · Pull Request #362 · docker-java/docker-java

Expand Up @@ -2,6 +2,8 @@
import java.util.Map;
import javax.annotation.CheckForNull;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; Expand All @@ -16,6 +18,17 @@ public class Statistics { @JsonProperty("read") private String read;
/** * @since Docker Remote API 1.21 */ @CheckForNull @JsonProperty("networks") private Map<String, Object> networks;
/** * @deprecated as of Docker Remote API 1.21, replaced by {@link #networks} */ @Deprecated @JsonProperty("network") private Map<String, Object> networkStats;
Expand All @@ -28,6 +41,18 @@ public class Statistics { @JsonProperty("cpu_stats") private Map<String, Object> cpuStats;
/** * @since Docker Remote API 1.21 */ @CheckForNull public Map<String, Object> getNetworks() { return networks; }
/** * @deprecated as of Docker Remote API 1.21, replaced by {@link #getNetworks()} */ @Deprecated public Map<String, Object> getNetworkStats() { return networkStats; } Expand Down