RLPark 1.0.0
Reinforcement Learning Framework in Java

ClientInfo.java

Go to the documentation of this file.
00001 package rlpark.plugin.rltoys.experiments.scheduling.internal.messages;
00002 
00003 import java.io.Serializable;
00004 import java.net.UnknownHostException;
00005 
00006 public class ClientInfo implements Serializable {
00007   private static final long serialVersionUID = 5234119951047042421L;
00008   final public int nbThreads;
00009   final public int nbCores;
00010   final public String hostName;
00011 
00012   public ClientInfo(int nbThread) {
00013     this.nbThreads = nbThread;
00014     this.nbCores = Runtime.getRuntime().availableProcessors();
00015     this.hostName = getLocalHostName();
00016   }
00017 
00018   static private String getLocalHostName() {
00019     String localhostName = "unknown";
00020     try {
00021       localhostName = java.net.InetAddress.getLocalHost().getHostName();
00022     } catch (UnknownHostException e) {
00023       Messages.displayError(e);
00024     }
00025     return localhostName;
00026   }
00027 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark