Package org.jamesii.core.util.info

Examples of org.jamesii.core.util.info.JavaInfo


      masterServerAddress =
          "rmi://localhost:" + MasterServer.DEFAULT_PORT + "/"
              + MasterServer.DEFAULT_BINDING_NAME;
    }
    if (capacity == null) {
      JavaInfo info = new JavaInfo();
      capacity = info.getCpus();
    }

    compManager = new ComputationManagement(capacity);

    SimSystem.report(Level.INFO, "Registering at master server: "
View Full Code Here


    setTitle(serverName + ":" + getTitle());
  }

  @Override
  public JComponent createContent() {
    JavaInfo info = new JavaInfo();
    if (server != null) {
      try {
        info = server.getVMinfo();
      } catch (RemoteException e) {
        SimSystem.report(e);
View Full Code Here

   *         virtual machine.
   */
  public static String getVMInfo() {
    String s = "Information about the virtual machine";

    s += new JavaInfo().toString();

    return s;
  }
View Full Code Here

    // the current state of this instance (of the experiment as such)
    if (getDataStorageFactory() != null) {
      IDataStorage<?> ds = getDataStorageFactory().getInstance();
      if (ds != null) {
        ds.writeExperimentSystemInformation(currentExperimentID, -1,
            SimSystem.VERSION, new JavaInfo());
        ds.storeExperiment(this);
      }
    }

    SimSystem.report(Level.CONFIG, "The experiment with uid "
        + currentExperimentID + " has been started using " + SimSystem.VERSION
        + " on machine " + new JavaInfo());
  }
View Full Code Here

  public void testExperimentSystemInformation() throws Exception {
    IUniqueID uid = UniqueIDGenerator.createUniqueID();
    Serializable expid = getDataStorage().setExperimentID(uid);
    long mid = 987987;
    String version = "AlphaBetaGamma123";
    JavaInfo ji1 = new JavaInfo();
    getDataStorage().writeExperimentSystemInformation(uid, mid, version, ji1);
    SystemInformation si =
        getDataStorage().getExperimentSystemInformation(expid);
    // go through the attributes of the SystemInformation items:
    assertEquals(mid, si.getMachineId());
    assertEquals(version, si.getJamesVersion());
    JavaInfo ji2 = si.getJavaInfo();
    assertEquals(ji1.getName(), ji2.getName());
    assertEquals(ji1.getVersion(), ji2.getVersion());
    assertEquals(ji1.getVendor(), ji2.getVendor());
    assertEquals(ji1.getInstDir(), ji2.getInstDir());
    assertEquals(ji1.getClassFormatVersion(), ji2.getClassFormatVersion());
    assertEquals(ji1.getClassPath(), ji2.getClassPath());
    assertEquals(ji1.getExtensionDir(), ji2.getExtensionDir());
    assertEquals(ji1.getSessionStarted(), ji2.getSessionStarted());
    assertEquals(ji1.getUpTime(), ji2.getUpTime());
    assertEquals(ji1.getOs(), ji2.getOs());
    assertEquals(ji1.getOsVersion(), ji2.getOsVersion());
    assertEquals(ji1.getOsArch(), ji2.getOsArch());
    assertEquals(ji1.getCpus(), ji2.getCpus());
    assertEquals(ji1.getTotalMemory(), ji2.getTotalMemory());
    assertEquals(ji1.getFreeMemory(), ji2.getFreeMemory());
    assertEquals(ji1.getMaxMemory(), ji2.getMaxMemory());
    assertEquals(ji1.getThreads(), ji2.getThreads());
    assertEquals(ji1.getUserName(), ji2.getUserName());
    assertEquals(ji1.getUserHome(), ji2.getUserHome());
    assertEquals(ji1.getUserWorkingDir(), ji2.getUserWorkingDir());

    // now check what happens, if one of the parameters reference null:
    expid =
        getDataStorage().setExperimentID(
            uid = UniqueIDGenerator.createUniqueID());
View Full Code Here

  public ParallelComputationTaskRunner(int maxThreads) throws RemoteException {

    int threadCount = maxThreads;
    if (maxThreads < 0) {
      // relative interpretation: use all but -maxThreads-1 cores
      JavaInfo info = new JavaInfo();
      threadCount = info.getCpus() + 1 + maxThreads;
    }
    // in rare cases (one cpu, maxThreads < -1) we might end up with too few
    // threads, let's use at least a single one then
    if (threadCount <= 0) {
      threadCount = 1;
View Full Code Here

      @Override
      public void execute() {
        BasicUtilities.invokeLaterOnEDT(new Runnable() {
          @Override
          public void run() {
            JavaInfo info = new JavaInfo();
            windowManager.addWindow(new SystemInfoView(info, "this system",
                Contribution.DIALOG));
          }
        });
      }
View Full Code Here

    return SimSystem.SIMSYSTEM + " " + SimSystem.VERSION;
  }

  @Override
  public JavaInfo getVMinfo() throws RemoteException {
    return new JavaInfo();
  }
View Full Code Here

      IObjectId objectID) throws RemoteException {
    Object local = localLocations.get(objectID);
    if (local == null) {
      throw new RemoteCommunicationCenterException(
          "RemoteCommunicationCenter: Invalid model location. Model is not located on host "
              + new JavaInfo().getHostName()
              + "\n"
              + "Tried to call "
              + methodName
              + " on object "
              + objectID.getClassNameFromObject()
View Full Code Here

  /**
   * Constructor.
   */
  private UniqueIDGenerator() {
    JavaInfo info = new JavaInfo();
    startedAt = info.getSessionStarted().getTime();
    macAddresses = info.getMacAddresses();
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.util.info.JavaInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.