/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Base class for all MonitoredVm implementations that utilize the
* HotSpot PerfData instrumentation buffer as the communications
* mechanism to the target Java Virtual Machine.
*
* @author Brian Doherty
* @since 1.5
*/
/**
* The VmIdentifier for the target.
*/
/**
* The shared memory instrumentation buffer for the target.
*/
/**
* The sampling interval, if the instrumentation buffer is acquired
* by sampling instead of shared memory mechanisms.
*/
protected int interval;
/**
* Create an AbstractMonitoredVm instance.
*
* @param vmid the VmIdentifier for the target
* @param interval the initial sampling interval
*/
throws MonitorException {
}
/**
* {@inheritDoc}
*/
return vmid;
}
/**
* {@inheritDoc}
*/
}
/**
* {@inheritDoc}
*/
}
/**
* {@inheritDoc}
*/
public void detach() {
/*
* no default action required because the detach operation for the
* native byte buffer is managed by the sun.misc.Perf class.
*/
}
/* ---- Methods to support polled MonitoredVm Implementations ----- */
/**
* {@inheritDoc}
*/
}
/**
* {@inheritDoc}
*/
public int getInterval() {
return interval;
}
/**
* {@inheritDoc}
*/
// XXX: implement
}
/**
* {@inheritDoc}
*/
// XXX: implement
return null;
}
/**
* {@inheritDoc}
*/
public void clearLastException() {
// XXX: implement
}
/**
* {@inheritDoc}
*/
public boolean isErrored() {
// XXX: implement
return false;
}
/**
* Get a list of the inserted and removed monitors since last called.
*
* @return MonitorStatus - the status of available Monitors for the
* target Java Virtual Machine.
* @throws MonitorException Thrown if communications errors occur
* while communicating with the target.
*/
return pdb.getMonitorStatus();
}
/* --------------- Methods to support VmListeners ----------------- */
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/* ---- Methods to support BufferedMonitoredVm Implementations ---- */
/**
* {@inheritDoc}
*/
public byte[] getBytes() {
}
/**
* {@inheritDoc}
*/
public int getCapacity() {
return pdb.getCapacity();
}
}