public MemoryIdentityCacheStatistics() {
}
public MemoryIdentityCacheStatistics(Bus bus, ManagedComponent parent) {
if (bus != null) {
InstrumentationManager im = bus.getExtension(InstrumentationManager.class);
if (im != null) {
try {
StringBuilder buffer = new StringBuilder();
ObjectName pname = parent.getObjectName();
String pn = pname.getKeyProperty(ManagementConstants.NAME_PROP);
String pt = pname.getKeyProperty(ManagementConstants.TYPE_PROP);
buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':')
.append(ManagementConstants.BUS_ID_PROP).append('=').append(bus.getId()).append(',')
.append(pt).append('=').append(pn).append(',')
.append(ManagementConstants.TYPE_PROP).append('=')
.append("MemoryIdentityCacheStatistics").append(',')
.append(ManagementConstants.NAME_PROP).append('=')
.append("MemoryIdentityCacheStatistics-" + System.identityHashCode(this));
objectName = new ObjectName(buffer.toString());
im.register(this);
} catch (JMException e) {
LOG.log(Level.WARNING, "Registering MemoryIdentityCacheStatistics failed.", e);
}
}
}