Java 类javax.management.openmbean.CompositeDataSupport 实例源码

项目:lams    文件:TriggerSupport.java   
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);
    }
}
项目:asura    文件:TriggerSupport.java   
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);
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:SlowQueryReportJmx.java   
/**
 * 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;
}
项目:tomcat7    文件:SlowQueryReportJmx.java   
/**
 * 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;
}
项目:tomcat7    文件:SlowQueryReport.java   
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);
}
项目:lams    文件:JobDetailSupport.java   
/**
 * @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);
    }
}
项目:lams    文件:CronTriggerSupport.java   
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);
    }
}
项目:lams    文件:SimpleTriggerSupport.java   
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);
    }
}
项目:lams    文件:JobExecutionContextSupport.java   
/**
 * @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);
    }
}
项目:asura    文件:JobDetailSupport.java   
/**
 * @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);
    }
}
项目:asura    文件:JobExecutionContextSupport.java   
/**
 * @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);
    }
}
项目:OpenJSharp    文件:GarbageCollectionNotifInfoCompositeData.java   
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);
    }
}
项目:OpenJSharp    文件:StackTraceElementCompositeData.java   
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);
    }
}
项目:OpenJSharp    文件:LockInfoCompositeData.java   
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);
    }
}
项目:OpenJSharp    文件:VMOptionCompositeData.java   
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);
    }
}
项目:OpenJSharp    文件:MemoryUsageCompositeData.java   
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);
    }
}
项目:OpenJSharp    文件:MemoryNotifInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryNotifInfoItemNames!
    final Object[] memoryNotifInfoItemValues = {
        memoryNotifInfo.getPoolName(),
        MemoryUsageCompositeData.toCompositeData(memoryNotifInfo.getUsage()),
        new Long(memoryNotifInfo.getCount()),
    };

    try {
        return new CompositeDataSupport(memoryNotifInfoCompositeType,
                                        memoryNotifInfoItemNames,
                                        memoryNotifInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:OpenJSharp    文件:DefaultMXBeanMappingFactory.java   
@Override
final Object toNonNullOpenValue(Object value)
        throws OpenDataException {
    CompositeType ct = (CompositeType) getOpenType();
    if (value instanceof CompositeDataView)
        return ((CompositeDataView) value).toCompositeData(ct);
    if (value == null)
        return null;

    Object[] values = new Object[getters.length];
    for (int i = 0; i < getters.length; i++) {
        try {
            Object got = MethodUtil.invoke(getters[i], value, (Object[]) null);
            values[i] = getterMappings[i].toOpenValue(got);
        } catch (Exception e) {
            throw openDataException("Error calling getter for " +
                                    itemNames[i] + ": " + e, e);
        }
    }
    return new CompositeDataSupport(ct, itemNames, values);
}
项目:monarch    文件:CompositeConverter.java   
/**
 * Converts to open value
 */
final Object toNonNullOpenValue(Object value) throws OpenDataException {
  CompositeType ct = (CompositeType) getOpenType();
  if (value instanceof CompositeDataView)
    return ((CompositeDataView) value).toCompositeData(ct);
  if (value == null)
    return null;

  Object[] values = new Object[getters.length];
  for (int i = 0; i < getters.length; i++) {
    try {
      Object got = getters[i].invoke(value, (Object[]) null);
      values[i] = getterConverters[i].toOpenValue(got);
    } catch (Exception e) {
      throw openDataException("Error calling getter for " + itemNames[i] + ": " + e, e);
    }
  }
  return new CompositeDataSupport(ct, itemNames, values);
}
项目:apache-tomcat-7.0.73-with-comment    文件:SlowQueryReport.java   
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);
}
项目:jdk8u-jdk    文件:GarbageCollectionNotifInfoCompositeData.java   
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);
    }
}
项目:jdk8u-jdk    文件:StackTraceElementCompositeData.java   
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);
    }
}
项目:jdk8u-jdk    文件:LockInfoCompositeData.java   
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);
    }
}
项目:jdk8u-jdk    文件:VMOptionCompositeData.java   
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);
    }
}
项目:jdk8u-jdk    文件:MemoryUsageCompositeData.java   
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);
    }
}
项目:jdk8u-jdk    文件:MemoryNotifInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryNotifInfoItemNames!
    final Object[] memoryNotifInfoItemValues = {
        memoryNotifInfo.getPoolName(),
        MemoryUsageCompositeData.toCompositeData(memoryNotifInfo.getUsage()),
        new Long(memoryNotifInfo.getCount()),
    };

    try {
        return new CompositeDataSupport(memoryNotifInfoCompositeType,
                                        memoryNotifInfoItemNames,
                                        memoryNotifInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:jdk8u-jdk    文件:DefaultMXBeanMappingFactory.java   
@Override
final Object toNonNullOpenValue(Object value)
        throws OpenDataException {
    CompositeType ct = (CompositeType) getOpenType();
    if (value instanceof CompositeDataView)
        return ((CompositeDataView) value).toCompositeData(ct);
    if (value == null)
        return null;

    Object[] values = new Object[getters.length];
    for (int i = 0; i < getters.length; i++) {
        try {
            Object got = MethodUtil.invoke(getters[i], value, (Object[]) null);
            values[i] = getterMappings[i].toOpenValue(got);
        } catch (Exception e) {
            throw openDataException("Error calling getter for " +
                                    itemNames[i] + ": " + e, e);
        }
    }
    return new CompositeDataSupport(ct, itemNames, values);
}
项目:openjdk-jdk10    文件:GarbageCollectionNotifInfoCompositeData.java   
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);
    }
}
项目:openjdk-jdk10    文件:VMOptionCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // vmOptionItemNames!
    final Object[] vmOptionItemValues = {
        option.getName(),
        option.getValue(),
        option.isWriteable(),
        option.getOrigin().toString(),
    };

    try {
        return new CompositeDataSupport(vmOptionCompositeType,
                                        vmOptionItemNames,
                                        vmOptionItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk-jdk10    文件:StackTraceElementCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // stackTraceElementItemNames!
    final Object[] stackTraceElementItemValues = {
        ste.getClassLoaderName(),
        ste.getModuleName(),
        ste.getModuleVersion(),
        ste.getClassName(),
        ste.getMethodName(),
        ste.getFileName(),
        ste.getLineNumber(),
        ste.isNativeMethod(),
    };
    try {
        return new CompositeDataSupport(stackTraceElementCompositeType,
                                        stackTraceElementItemNames,
                                        stackTraceElementItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk-jdk10    文件:LockInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // lockInfoItemNames!
    final Object[] lockInfoItemValues = {
        new String(lock.getClassName()),
        lock.getIdentityHashCode(),
    };

    try {
        return new CompositeDataSupport(lockInfoCompositeType,
                                        lockInfoItemNames,
                                        lockInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw Util.newException(e);
    }
}
项目:openjdk-jdk10    文件:MemoryUsageCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryUsageItemNames!
    final Object[] memoryUsageItemValues = {
        usage.getInit(),
        usage.getUsed(),
        usage.getCommitted(),
        usage.getMax(),
    };

    try {
        return new CompositeDataSupport(memoryUsageCompositeType,
                                        memoryUsageItemNames,
                                        memoryUsageItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk-jdk10    文件:MemoryNotifInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryNotifInfoItemNames!
    final Object[] memoryNotifInfoItemValues = {
        memoryNotifInfo.getPoolName(),
        MemoryUsageCompositeData.toCompositeData(memoryNotifInfo.getUsage()),
        memoryNotifInfo.getCount(),
    };

    try {
        return new CompositeDataSupport(memoryNotifInfoCompositeType,
                                        memoryNotifInfoItemNames,
                                        memoryNotifInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk-jdk10    文件:DefaultMXBeanMappingFactory.java   
@Override
final Object toNonNullOpenValue(Object value)
        throws OpenDataException {
    CompositeType ct = (CompositeType) getOpenType();
    if (value instanceof CompositeDataView)
        return ((CompositeDataView) value).toCompositeData(ct);
    if (value == null)
        return null;

    Object[] values = new Object[getters.length];
    for (int i = 0; i < getters.length; i++) {
        try {
            Object got = MethodUtil.invoke(getters[i], value, (Object[]) null);
            values[i] = getterMappings[i].toOpenValue(got);
        } catch (Exception e) {
            throw openDataException("Error calling getter for " +
                                    itemNames[i] + ": " + e, e);
        }
    }
    return new CompositeDataSupport(ct, itemNames, values);
}
项目:openjdk9    文件:GarbageCollectionNotifInfoCompositeData.java   
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);
    }
}
项目:openjdk9    文件:VMOptionCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // vmOptionItemNames!
    final Object[] vmOptionItemValues = {
        option.getName(),
        option.getValue(),
        option.isWriteable(),
        option.getOrigin().toString(),
    };

    try {
        return new CompositeDataSupport(vmOptionCompositeType,
                                        vmOptionItemNames,
                                        vmOptionItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk9    文件:StackTraceElementCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // stackTraceElementItemNames!
    final Object[] stackTraceElementItemValues = {
        ste.getClassName(),
        ste.getMethodName(),
        ste.getFileName(),
        ste.getLineNumber(),
        ste.isNativeMethod(),
        ste.getModuleName(),
        ste.getModuleVersion(),
    };
    try {
        return new CompositeDataSupport(stackTraceElementCompositeType,
                                        stackTraceElementItemNames,
                                        stackTraceElementItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk9    文件:LockInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // lockInfoItemNames!
    final Object[] lockInfoItemValues = {
        new String(lock.getClassName()),
        lock.getIdentityHashCode(),
    };

    try {
        return new CompositeDataSupport(lockInfoCompositeType,
                                        lockInfoItemNames,
                                        lockInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw Util.newException(e);
    }
}
项目:openjdk9    文件:MemoryUsageCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryUsageItemNames!
    final Object[] memoryUsageItemValues = {
        usage.getInit(),
        usage.getUsed(),
        usage.getCommitted(),
        usage.getMax(),
    };

    try {
        return new CompositeDataSupport(memoryUsageCompositeType,
                                        memoryUsageItemNames,
                                        memoryUsageItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}
项目:openjdk9    文件:MemoryNotifInfoCompositeData.java   
protected CompositeData getCompositeData() {
    // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
    // memoryNotifInfoItemNames!
    final Object[] memoryNotifInfoItemValues = {
        memoryNotifInfo.getPoolName(),
        MemoryUsageCompositeData.toCompositeData(memoryNotifInfo.getUsage()),
        memoryNotifInfo.getCount(),
    };

    try {
        return new CompositeDataSupport(memoryNotifInfoCompositeType,
                                        memoryNotifInfoItemNames,
                                        memoryNotifInfoItemValues);
    } catch (OpenDataException e) {
        // Should never reach here
        throw new AssertionError(e);
    }
}