summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/dnbd3/status/output/ServerStats.java')
-rw-r--r--src/main/java/org/openslx/dnbd3/status/output/ServerStats.java31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java b/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java
index b915484..67dda59 100644
--- a/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java
+++ b/src/main/java/org/openslx/dnbd3/status/output/ServerStats.java
@@ -1,8 +1,14 @@
package org.openslx.dnbd3.status.output;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openslx.dnbd3.status.rpc.Client;
+import org.openslx.dnbd3.status.rpc.Image;
+
import com.google.gson.annotations.Expose;
-public class ServerStats
+public class ServerStats implements Cloneable
{
@Expose
@@ -18,4 +24,27 @@ public class ServerStats
@Expose
public long timestamp;
+ public List<Image> images;
+
+ public List<Client> clients;
+
+ @Override
+ public ServerStats clone()
+ {
+ ServerStats n = new ServerStats();
+ n.address = this.address;
+ n.clientCount = this.clientCount;
+ n.uptime = this.uptime;
+ n.bytesSent = this.bytesSent;
+ n.bytesReceived = this.bytesReceived;
+ n.timestamp = this.timestamp;
+ if ( this.images != null ) {
+ n.images = new ArrayList<>( this.images );
+ }
+ if ( this.clients != null ) {
+ n.clients = new ArrayList<>( this.clients );
+ }
+ return n;
+ }
+
}