* Create a data store statistics object.
* @param collector the profile collector used to create profiling
* objects and register the MBean with JMX
*/
DataStoreStats(ProfileCollector collector) {
ProfileConsumer consumer =
collector.getConsumer(ProfileCollectorImpl.CORE_CONSUMER_PREFIX
+ "DataStore");
ProfileLevel level = ProfileLevel.MAX;
ProfileDataType type = ProfileDataType.TASK_AND_AGGREGATE;
createObjectOp =
consumer.createOperation("createObject", type, level);
markForUpdateOp =
consumer.createOperation("markForUpdate", type, level);
getObjectOp = consumer.createOperation("getObject", type, level);
getObjectForUpdateOp =
consumer.createOperation("getObjectForUpdate", type, level);
setObjectOp = consumer.createOperation("setObject", type, level);
setObjectsOp = consumer.createOperation("setObjects", type, level);
removeObjectOp =
consumer.createOperation("removeObject", type, level);
getBindingOp = consumer.createOperation("getBinding", type, level);
setBindingOp = consumer.createOperation("setBinding", type, level);
removeBindingOp =
consumer.createOperation("removeBinding", type, level);
nextBoundNameOp =
consumer.createOperation("nextBoundName", type, level);
getClassIdOp = consumer.createOperation("getClassId", type, level);
getClassInfoOp =
consumer.createOperation("getClassInfo", type, level);
nextObjectIdOp =
consumer.createOperation("nextObjectIdOp", type, level);
// Counters
readBytesCounter = consumer.createCounter("readBytes", type, level);
readObjectsCounter =
consumer.createCounter("readObjects", type, level);
writtenBytesCounter =
consumer.createCounter("writtenBytes", type, level);
writtenObjectsCounter =
consumer.createCounter("writtenObjects", type, level);
// Samples
readBytesSample =
consumer.createSample("readBytes", type, level);
writtenBytesSample =
consumer.createSample("writtenBytes", type, level);
}