Example #1
0
  /**
   * Create a PerfDataBuffer instance for accessing the specified instrumentation buffer.
   *
   * @param rvm the proxy to the remote MonitredVm object
   * @param lvmid the local Java Virtual Machine Identifier of the remote target.
   * @throws MonitorException
   */
  public PerfDataBuffer(RemoteVm rvm, int lvmid) throws MonitorException {

    this.rvm = rvm;
    try {
      ByteBuffer buffer = ByteBuffer.allocate(rvm.getCapacity());
      sample(buffer);
      createPerfDataBuffer(buffer, lvmid);

    } catch (RemoteException e) {
      throw new MonitorException("Could not read data for remote JVM " + lvmid, e);
    }
  }