blob: d464695af608269eb148aff6d64f3435409955c0 (
plain) (
tree)
|
|
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 implements Cloneable
{
@Expose
public String address;
@Expose
public int clientCount;
@Expose
public int serverCount;
@Expose
public long uptime;
@Expose
public long bytesSent;
@Expose
public long bytesReceived;
@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.serverCount = this.serverCount;
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;
}
}
|