当前位置: 首页>>代码示例>>Java>>正文


Java ManagedAttribute类代码示例

本文整理汇总了Java中org.springframework.jmx.export.annotation.ManagedAttribute的典型用法代码示例。如果您正苦于以下问题:Java ManagedAttribute类的具体用法?Java ManagedAttribute怎么用?Java ManagedAttribute使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ManagedAttribute类属于org.springframework.jmx.export.annotation包,在下文中一共展示了ManagedAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRegisteredServicesAsStrings

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
/**
 * Gets the registered services as strings.
 *
 * @return the registered services as strings
 */
@ManagedAttribute(description = "Retrieves the list of Registered Services in a slightly friendlier output.")
public final List<String> getRegisteredServicesAsStrings() {
    final List<String> services = new ArrayList<>();

    for (final RegisteredService r : this.servicesManager.getAllServices()) {
    services.add(new StringBuilder().append("id: ").append(r.getId())
            .append(" name: ").append(r.getName())
            .append(" serviceId: ").append(r.getServiceId())
            .toString());
    }

    return services;
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:19,代码来源:AbstractServicesManagerMBean.java

示例2: getApiRequestsSummary

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description = "The total number of requests sent of each supported Interface command")
public Map<String, Long> getApiRequestsSummary() {
	return apiInterface.getRequestsSummary().entrySet()
														.stream()
														.collect(
																Collectors.toMap(	me -> me.getKey().toString(), 
																					me -> me.getValue())
														);
}
 
开发者ID:BuaBook,项目名称:buabook-api-interface,代码行数:10,代码来源:ApiInterfaceManagement.java

示例3: getRegisteredServicesAsStrings

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description = "Retrieves the list of Registered Services in a slightly friendlier output.")
public final List<String> getRegisteredServicesAsStrings() {
    final List<String> services = new ArrayList<String>();

    for (final RegisteredService r : this.servicesManager.getAllServices()) {
    services.add(new StringBuilder().append("id: ").append(r.getId())
            .append(" name: ").append(r.getName())
            .append(" enabled: ").append(r.isEnabled())
            .append(" ssoEnabled: ").append(r.isSsoEnabled())
            .append(" serviceId: ").append(r.getServiceId())
            .toString());
    }

    return services;
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:16,代码来源:AbstractServicesManagerMBean.java

示例4: getCallTime

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute
public long getCallTime() {
    if (this.callCount > 0) {
        return this.accumulatedCallTime / this.callCount;
    } else {
        return 0;
    }
}
 
开发者ID:apssouza22,项目名称:java-microservice,代码行数:9,代码来源:CallMonitoringAspect.java

示例5: getDataSourceImpl

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute
public String getDataSourceImpl() {
    if (this.entityManagerFactory == null || this.entityManagerFactory.getDataSource() == null) {
        return "";
    }
    return this.entityManagerFactory.getDataSource().getClass().getName();
}
 
开发者ID:eclipse,项目名称:keti,代码行数:8,代码来源:DataSourceMBean.java

示例6: setPurgeFlowsOlderThan

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description="Purge flows older than given duration "
        + "(e.g. \"30d\" will purge flows older than 30 days)")
public void setPurgeFlowsOlderThan(String purgeFlowsOlderThan) {
    ApplicationConfig applicationConfig = flowManager.getApplicationConfig(application);
    String s = formatInput(purgeFlowsOlderThan);
    if (s != null) {
        applicationConfig.setPurgeFlowsOlderThan(s);
        flowManager.mergeApplicationConfig(applicationConfig);
    }
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:11,代码来源:FlowPurgerMBean.java

示例7: setDoNotPurgeErrorFlows

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description="Set to true to exclude ERROR flows from being purged. "
    + "Set to false to purge CLEAN and ERROR flows")
public void setDoNotPurgeErrorFlows(boolean doNotPurgeErrorFlows) {
    ApplicationConfig applicationConfig = flowManager.getApplicationConfig(application);
    applicationConfig.setDoNotPurgeErrorFlows(doNotPurgeErrorFlows);
    flowManager.mergeApplicationConfig(applicationConfig);
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:8,代码来源:FlowPurgerMBean.java

示例8: getSchedulerMetaData

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description="Schedulers metadata")
public Map<String, String> getSchedulerMetaData() {
    Map<String, String> map = new HashMap<>();
    try {
        map.put("Scheduler Name", scheduler.getMetaData().getSchedulerName());
        map.put("Scheduler Class", scheduler.getMetaData().getSchedulerClass().getCanonicalName());
        map.put("Thread Pool Class", scheduler.getMetaData().getThreadPoolClass().getCanonicalName());
        map.put("Thread Pool Size", String.valueOf(scheduler.getMetaData().getThreadPoolSize()));
        map.put("Number Of Jobs Executed", String.valueOf(scheduler.getMetaData().getNumberOfJobsExecuted()));
        map.put("Running Since", MBeanUtils.formatDate(scheduler.getMetaData().getRunningSince()));
        return map;
    } catch (SchedulerException e) {
        return null;
    }
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:16,代码来源:FlowPurgerMBean.java

示例9: getUpperTimeLimit

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description="Upper time limit")
public String getUpperTimeLimit() {
    if (upperTimeLimit == null) {
        return null;
    }
    return formatDate(upperTimeLimit);
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:8,代码来源:FlowManagerMBean.java

示例10: setUpperTimeLimit

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description="Upper time limit")
public void setUpperTimeLimit(String upperTimeLimit) throws ParseException {
    if (upperTimeLimit == null || upperTimeLimit.trim().equals("")) {
        this.upperTimeLimit = null;
    } else {
        this.upperTimeLimit = parseDate(upperTimeLimit);
    }
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:9,代码来源:FlowManagerMBean.java

示例11: getMaxFlows

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description = 
"Maximum number of flows returned by finder operations or processed during replay operations")
public String getMaxFlows() {
    if (maxResults == null) {
        return null;
    }
    return maxResults.toString();
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:9,代码来源:FlowManagerMBean.java

示例12: setMaxFlows

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute(description = 
"Maximum number of flows returned by finder operations or processed during replay operations")
public void setMaxFlows(String maxFlows) {
    if (maxFlows == null || maxFlows.trim().equals("")) {
        maxResults = null;
    } else {
        maxResults = Integer.valueOf(maxFlows);
    }
}
 
开发者ID:oehf,项目名称:ipf-flow-manager,代码行数:10,代码来源:FlowManagerMBean.java

示例13: getHealth

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute
public Map getHealth()
{
   Health health = healthEndpoint.invoke();
   Map healthMap = new LinkedHashMap();
   healthMap.put("status", getStatus(health));
   healthMap.put("detail", getDetails(health.getDetails()));
   return healthMap;
}
 
开发者ID:HomeAdvisor,项目名称:Kafdrop,代码行数:10,代码来源:HealthCheckConfiguration.java

示例14: getCallTime

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
@ManagedAttribute
public long getCallTime() {
    if (this.callCount > 0)
        return this.accumulatedCallTime / this.callCount;
    else
        return 0;
}
 
开发者ID:PacktPublishing,项目名称:DevOps-for-Web-Development,代码行数:8,代码来源:CallMonitoringAspect.java

示例15: getObjectName

import org.springframework.jmx.export.annotation.ManagedAttribute; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.springframework.jmx.export.naming.SelfNaming#getObjectName()
 */
@Override
@ManagedAttribute(description="This processor's JMX ObjectName")
public ObjectName getObjectName() throws MalformedObjectNameException {
	objectName = JMXHelper.objectName("com.heliosapm.streams.metrics.processors:service=Processor,type=" + getClass().getSimpleName() + ",instance=" + instanceId);
	return objectName;
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:11,代码来源:AbstractStreamedMetricProcessor.java


注:本文中的org.springframework.jmx.export.annotation.ManagedAttribute类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。