當前位置: 首頁>>代碼示例>>Java>>正文


Java CompositeDataSupport類代碼示例

本文整理匯總了Java中javax.management.openmbean.CompositeDataSupport的典型用法代碼示例。如果您正苦於以下問題:Java CompositeDataSupport類的具體用法?Java CompositeDataSupport怎麽用?Java CompositeDataSupport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CompositeDataSupport類屬於javax.management.openmbean包,在下文中一共展示了CompositeDataSupport類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
public static CompositeData toCompositeData(Trigger trigger) {
	try {
		return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
				new Object[] {
						trigger.getName(),
						trigger.getGroup(),
						trigger.getJobName(),
						trigger.getJobGroup(),
						trigger.getDescription(),
						JobDataMapSupport.toTabularData(trigger
								.getJobDataMap()), trigger.isVolatile(),
						trigger.getCalendarName(),
						trigger.getFireInstanceId(),
						trigger.getMisfireInstruction(),
						trigger.getPriority(), trigger.getStartTime(),
						trigger.getEndTime(), trigger.getNextFireTime(),
						trigger.getPreviousFireTime(),
						trigger.getFinalFireTime() });
	} catch (OpenDataException e) {
		throw new RuntimeException(e);
	}
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:23,代碼來源:TriggerSupport.java

示例2: getSlowQueriesCD

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
/**
 * JMX operation - returns all the queries we have collected.
 * @return - the slow query report as composite data.
 */
@Override
public CompositeData[] getSlowQueriesCD() throws OpenDataException {
    CompositeDataSupport[] result = null;
    ConcurrentHashMap<String,QueryStats> queries = perPoolStats.get(poolName);
    if (queries!=null) {
        Set<Map.Entry<String,QueryStats>> stats = queries.entrySet();
        if (stats!=null) {
            result = new CompositeDataSupport[stats.size()];
            Iterator<Map.Entry<String,QueryStats>> it = stats.iterator();
            int pos = 0;
            while (it.hasNext()) {
                Map.Entry<String,QueryStats> entry = it.next();
                QueryStats qs = entry.getValue();
                result[pos++] = qs.getCompositeData(getCompositeType());
            }
        }
    }
    return result;
}
 
開發者ID:sunmingshuai,項目名稱:apache-tomcat-7.0.73-with-comment,代碼行數:24,代碼來源:SlowQueryReportJmx.java

示例3: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
public CompositeDataSupport getCompositeData(final CompositeType type) throws OpenDataException{
    Object[] values = new Object[] {
            query,
            Integer.valueOf(nrOfInvocations),
            Long.valueOf(maxInvocationTime),
            Long.valueOf(maxInvocationDate),
            Long.valueOf(minInvocationTime),
            Long.valueOf(minInvocationDate),
            Long.valueOf(totalInvocationTime),
            Long.valueOf(failures),
            Integer.valueOf(prepareCount),
            Long.valueOf(prepareTime),
            Long.valueOf(lastInvocation)
    };
    return new CompositeDataSupport(type,FIELD_NAMES,values);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:17,代碼來源:SlowQueryReport.java

示例4: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
/**
 * @param jobDetail
 * @return CompositeData
 */
public static CompositeData toCompositeData(JobDetail jobDetail) {
    try {
        return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
                new Object[] {
                        jobDetail.getKey().getName(),
                        jobDetail.getKey().getGroup(),
                        jobDetail.getDescription(),
                        jobDetail.getJobClass().getName(),
                        JobDataMapSupport.toTabularData(jobDetail
                                .getJobDataMap()), 
                        jobDetail.isDurable(),
                        jobDetail.requestsRecovery(), });
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:21,代碼來源:JobDetailSupport.java

示例5: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
public static CompositeData toCompositeData(CronTrigger trigger) {
    try {
        return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
                new Object[] {
                        trigger.getCronExpression(),
                        trigger.getTimeZone(),
                        trigger.getKey().getName(),
                        trigger.getKey().getGroup(),
                        trigger.getJobKey().getName(),
                        trigger.getJobKey().getGroup(),
                        trigger.getDescription(),
                        JobDataMapSupport.toTabularData(trigger
                                .getJobDataMap()),
                        trigger.getCalendarName(),
                        ((OperableTrigger)trigger).getFireInstanceId(),
                        trigger.getMisfireInstruction(),
                        trigger.getPriority(), trigger.getStartTime(),
                        trigger.getEndTime(), trigger.getNextFireTime(),
                        trigger.getPreviousFireTime(),
                        trigger.getFinalFireTime() });
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:25,代碼來源:CronTriggerSupport.java

示例6: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
public static CompositeData toCompositeData(SimpleTrigger trigger) {
    try {
        return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
                new Object[] {
                        trigger.getRepeatCount(),
                        trigger.getRepeatInterval(),
                        trigger.getTimesTriggered(),
                        trigger.getKey().getName(),
                        trigger.getKey().getGroup(),
                        trigger.getJobKey().getName(),
                        trigger.getJobKey().getGroup(),
                        trigger.getDescription(),
                        JobDataMapSupport.toTabularData(trigger
                                .getJobDataMap()),
                        trigger.getCalendarName(),
                        ((OperableTrigger)trigger).getFireInstanceId(),
                        trigger.getMisfireInstruction(),
                        trigger.getPriority(), trigger.getStartTime(),
                        trigger.getEndTime(), trigger.getNextFireTime(),
                        trigger.getPreviousFireTime(),
                        trigger.getFinalFireTime() });
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:26,代碼來源:SimpleTriggerSupport.java

示例7: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
/**
 * @return composite data
 */
public static CompositeData toCompositeData(JobExecutionContext jec)
        throws SchedulerException {
    try {
        return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
                new Object[] {
                        jec.getScheduler().getSchedulerName(),
                        jec.getTrigger().getKey().getName(),
                        jec.getTrigger().getKey().getGroup(),
                        jec.getJobDetail().getKey().getName(),
                        jec.getJobDetail().getKey().getGroup(),
                        JobDataMapSupport.toTabularData(jec
                                .getMergedJobDataMap()),
                        jec.getTrigger().getCalendarName(),
                        jec.isRecovering(),
                        jec.getRefireCount(),
                        jec.getFireTime(), jec.getScheduledFireTime(),
                        jec.getPreviousFireTime(), jec.getNextFireTime(),
                        jec.getJobRunTime(),
                        jec.getFireInstanceId() });
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:27,代碼來源:JobExecutionContextSupport.java

示例8: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
public static CompositeData toCompositeData(Trigger trigger) {
    try {
        return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
                new Object[] {
                        trigger.getKey().getName(),
                        trigger.getKey().getGroup(),
                        trigger.getJobKey().getName(),
                        trigger.getJobKey().getGroup(),
                        trigger.getDescription(),
                        JobDataMapSupport.toTabularData(trigger
                                .getJobDataMap()),
                        trigger.getCalendarName(),
                        ((OperableTrigger)trigger).getFireInstanceId(),
                        trigger.getMisfireInstruction(),
                        trigger.getPriority(), trigger.getStartTime(),
                        trigger.getEndTime(), trigger.getNextFireTime(),
                        trigger.getPreviousFireTime(),
                        trigger.getFinalFireTime() });
    } catch (OpenDataException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:23,代碼來源:TriggerSupport.java

示例9: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
/**
 * @param jobDetail
 * @return CompositeData
 */
public static CompositeData toCompositeData(JobDetail jobDetail) {
	try {
		return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
				new Object[] {
						jobDetail.getName(),
						jobDetail.getGroup(),
						jobDetail.getDescription(),
						jobDetail.getJobClass().getName(),
						JobDataMapSupport.toTabularData(jobDetail
								.getJobDataMap()), jobDetail.isVolatile(),
						jobDetail.isDurable(),
						jobDetail.requestsRecovery(), });
	} catch (OpenDataException e) {
		throw new RuntimeException(e);
	}
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:21,代碼來源:JobDetailSupport.java

示例10: toCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
/**
 * @return composite data
 */
public static CompositeData toCompositeData(JobExecutionContext jec)
		throws SchedulerException {
	try {
		return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
				new Object[] {
						jec.getScheduler().getSchedulerName(),
						jec.getTrigger().getFullName(),
						jec.getJobDetail().getFullName(),
						JobDataMapSupport.toTabularData(jec
								.getMergedJobDataMap()),
						determineCalendarName(jec),
						Boolean.valueOf(jec.isRecovering()),
						Integer.valueOf(jec.getRefireCount()),
						jec.getFireTime(), jec.getScheduledFireTime(),
						jec.getPreviousFireTime(), jec.getNextFireTime(),
						Long.valueOf(jec.getJobRunTime()) });
	} catch (OpenDataException e) {
		throw new RuntimeException(e);
	}
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:24,代碼來源:JobExecutionContextSupport.java

示例11: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // gcNotifInfoItemNames!
    final Object[] gcNotifInfoItemValues;
    gcNotifInfoItemValues = new Object[] {
        gcNotifInfo.getGcName(),
        gcNotifInfo.getGcAction(),
        gcNotifInfo.getGcCause(),
        GcInfoCompositeData.toCompositeData(gcNotifInfo.getGcInfo())
    };

    CompositeType gict = getCompositeTypeByBuilder();

    try {
        return new CompositeDataSupport(gict,
                                        gcNotifInfoItemNames,
                                        gcNotifInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:23,代碼來源:GarbageCollectionNotifInfoCompositeData.java

示例12: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // stackTraceElementItemNames!
    final Object[] stackTraceElementItemValues = {
        ste.getClassName(),
        ste.getMethodName(),
        ste.getFileName(),
        new Integer(ste.getLineNumber()),
        new Boolean(ste.isNativeMethod()),
    };
    try {
        return new CompositeDataSupport(stackTraceElementCompositeType,
                                        stackTraceElementItemNames,
                                        stackTraceElementItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:20,代碼來源:StackTraceElementCompositeData.java

示例13: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // lockInfoItemNames!
    final Object[] lockInfoItemValues = {
        new String(lock.getClassName()),
        new Integer(lock.getIdentityHashCode()),
    };

    try {
        return new CompositeDataSupport(lockInfoCompositeType,
                                        lockInfoItemNames,
                                        lockInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw Util.newException(e);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:18,代碼來源:LockInfoCompositeData.java

示例14: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // vmOptionItemNames!
    final Object[] vmOptionItemValues = {
        option.getName(),
        option.getValue(),
        new Boolean(option.isWriteable()),
        option.getOrigin().toString(),
    };

    try {
        return new CompositeDataSupport(vmOptionCompositeType,
                                        vmOptionItemNames,
                                        vmOptionItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:20,代碼來源:VMOptionCompositeData.java

示例15: getCompositeData

import javax.management.openmbean.CompositeDataSupport; //導入依賴的package包/類
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryUsageItemNames!
    final Object[] memoryUsageItemValues = {
        new Long(usage.getInit()),
        new Long(usage.getUsed()),
        new Long(usage.getCommitted()),
        new Long(usage.getMax()),
    };

    try {
        return new CompositeDataSupport(memoryUsageCompositeType,
                                        memoryUsageItemNames,
                                        memoryUsageItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:20,代碼來源:MemoryUsageCompositeData.java


注:本文中的javax.management.openmbean.CompositeDataSupport類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。