ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(attrName, description, getter, setter);
Method getter = getters.get(name); Method setter = setters.get(name); ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(name, descriptions.get(name), getter,
@Override public ModelMBeanAttributeInfo createAttributeInfo() { Descriptor desc = new DescriptorSupport(new String[] {"name=" + this.displayName, "descriptorType=attribute", "currencyTimeLimit=-1", // always stale "displayName=" + this.displayName, "getMethod=getValue"}); Assert.assertTrue(this.stat != null, "Stat target object is null!"); desc.setField("targetObject", this.stat); ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(this.displayName, // name this.type, // type this.description, // description this.readable, // isReadable this.writeable, // isWritable this.is, // isIs desc); return info; } }
@Override public ModelMBeanAttributeInfo createAttributeInfo() { Descriptor desc = new DescriptorSupport(new String[] {"name=" + this.displayName, "descriptorType=attribute", "currencyTimeLimit=-1", // always stale "displayName=" + this.displayName, "getMethod=getJmxValue", "setMethod=setJmxValue"}); Assert.assertTrue(this.config != null, "Config target object is null!"); desc.setField("targetObject", this.config); ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(this.displayName, // name this.type, // type this.description, // description this.readable, // isReadable this.writeable, // isWritable this.is, // isIs desc); return info; } }
ModelMBeanAttributeInfo info = new ModelMBeanAttributeInfo(attrName, description, getter, setter);
private void populateFullCheckpointTime(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo fullCheckpointTime = new ModelMBeanAttributeInfo(FULL_CHECKPOINT_TIME, long.class.getName(), "Time which is spent on each full checkpoint", true, false, false); performanceAttributes.add(fullCheckpointTime); }
@Override protected void addExtraAttributes(List<ModelMBeanAttributeInfo> attributes) { attributes.add(new ModelMBeanAttributeInfo( "attributes", Map.class.getName(), "attributes", true, false, false)); }
private void populateWriteCacheFuzzyCheckpointTime(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo fuzzyCheckpointTime = new ModelMBeanAttributeInfo(WRITE_CACHE_FUZZY_CHECKPOINT_TIME, long.class.getName(), "Time which is spent on each fuzzy checkpoint", true, false, false); performanceAttributes.add(fuzzyCheckpointTime); }
private void populateWALSize(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo walSize = new ModelMBeanAttributeInfo(WAL_SIZE, long.class.getName(), "WAL size in bytes", true, false, false); performanceAttributes.add(walSize); }
private void populateWALCacheOverflowCount(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo walCacheOverflowCount = new ModelMBeanAttributeInfo(WAL_CACHE_OVERFLOW_COUNT, long.class.getName(), "Count of times when there was not enough space in WAL to keep already written data", true, false, false); performanceAttributes.add(walCacheOverflowCount); }
private void populateWALStartAOLogTime(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo walLogTime = new ModelMBeanAttributeInfo(WAL_START_AO_LOG_TIME, long.class.getName(), "Time which is spent to log record which indicates start of atomic operation in WAL", true, false, false); performanceAttributes.add(walLogTime); }
private void populateWriteCacheFlushOperationsTime(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo flushOperationsTime = new ModelMBeanAttributeInfo(WRITE_CACHE_FLUSH_OPERATION_TIME, long.class.getName(), "Time which is spent on each flush operation", true, false, false); performanceAttributes.add(flushOperationsTime); }
private void populateFullCheckpointCount(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo fullCheckpointCount = new ModelMBeanAttributeInfo(FULL_CHECKPOINT_COUNT, long.class.getName(), "Amount of times full checkpoints were executed by storage", true, false, false); performanceAttributes.add(fullCheckpointCount); }
private void populateWriteCacheOverflowCount(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo writeCacheOverflowCount = new ModelMBeanAttributeInfo(WRITE_CACHE_OVERFLOW_COUNT, long.class.getName(), "Count of times when there was not enough space in write cache to keep already written data", true, false, false); performanceAttributes.add(writeCacheOverflowCount); }
public MBeanAttribute(Field field, String exportName, String description, Access access) { this.field = field; this.attributeInfo = new ModelMBeanAttributeInfo( exportName, field.getType().getName(), description, access == Access.RO || access == Access.RW, access == Access.WO || access == Access.RW, false); }
private void populateReadSpeedFromFile(List<MBeanAttributeInfo> performanceAttributes, Collection<String> components) { final MBeanAttributeInfo readSpeedFromFile = new ModelMBeanAttributeInfo(READ_SPEED_FROM_FILE, long.class.getName(), "Read speed from file system in pages per second", true, false, false); performanceAttributes.add(readSpeedFromFile); for (String component : components) { final MBeanAttributeInfo componentReadSpeedFromFile = new ModelMBeanAttributeInfo( READ_SPEED_FROM_FILE + COMPONENT_SEPARATOR + component, long.class.getName(), "Read speed from file system in pages per second for component " + component, true, false, false); performanceAttributes.add(componentReadSpeedFromFile); } }
private void populateReadSpeedFromCache(List<MBeanAttributeInfo> performanceAttributes, Collection<String> components) { final MBeanAttributeInfo readSpeedFromCache = new ModelMBeanAttributeInfo(READ_SPEED_FROM_CACHE, long.class.getName(), "Read speed from disk cache in pages per second", true, false, false); performanceAttributes.add(readSpeedFromCache); for (String component : components) { final MBeanAttributeInfo componentReadSpeedFromCache = new ModelMBeanAttributeInfo( READ_SPEED_FROM_CACHE + COMPONENT_SEPARATOR + component, long.class.getName(), "Read speed from disk cache in pages per second for component " + component, true, false, false); performanceAttributes.add(componentReadSpeedFromCache); } }
private void populatePagesPerOperation(List<MBeanAttributeInfo> performanceAttributes, Collection<String> components) { for (String component : components) { final MBeanAttributeInfo componentCacheHits = new ModelMBeanAttributeInfo( PAGES_PER_OPERATION + COMPONENT_SEPARATOR + component, int.class.getName(), "Average amount of pages per operation for component " + component, true, false, false); performanceAttributes.add(componentCacheHits); } }
private void populateWriteCachePagesPerFlush(List<MBeanAttributeInfo> performanceAttributes) { final MBeanAttributeInfo pagesPerFlush = new ModelMBeanAttributeInfo(WRITE_CACHE_PAGES_PER_FLUSH, long.class.getName(), "Amount of pages are flushed inside of write cache flush operation", true, false, false); performanceAttributes.add(pagesPerFlush); }
public MBeanProperty(BeanProperty beanProperty, String exportName, String description, Access access) { this.beanProperty = beanProperty; try { this.attributeInfo = new ModelMBeanAttributeInfo( exportName, description, access == Access.RO || access == Access.RW ? beanProperty.getReadMethod() : null, access == Access.WO || access == Access.RW ? beanProperty.getWriteMethod() : null); } catch (IntrospectionException e) { throw new IllegalArgumentException("Error creating property from " + beanProperty + ": " + e.getMessage(), e); } }