當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。