javax.management.openmbean.SimpleType#LONG源码实例Demo

下面列出了javax.management.openmbean.SimpleType#LONG 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType makeSummariesType_pre_4_0() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.StreamSummary";
  String description = "StreamSummary";
  String[] itemNames = {
      "cfId",
      "files",
      "totalSize"
  };
  String[] itemDescriptions = {
      "cfId",
      "files",
      "totalSize"
  };
  OpenType[] itemTypes = {
      SimpleType.STRING,
      SimpleType.INTEGER,
      SimpleType.LONG
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码2 项目: datakernel   文件: ExceptionStatsTest.java
@Before
public void before() throws OpenDataException {
	exceptionDetailsItemNames = new String[]{
			"lastException",
			"lastExceptionCausedObject",
			"lastExceptionStackTrace",
			"lastExceptionTimestamp",
			"totalExceptions"
	};

	exceptionDetailsItemTypes = new OpenType<?>[]{
			SimpleType.STRING,
			SimpleType.STRING,
			new ArrayType<>(1, SimpleType.STRING),
			SimpleType.LONG,
			SimpleType.INTEGER
	};
}
 
源代码3 项目: datakernel   文件: AttributeNodeForSimpleType.java
private static SimpleType<?> simpleTypeOf(Class<?> clazz) throws IllegalArgumentException {
	if (clazz == boolean.class || clazz == Boolean.class) {
		return SimpleType.BOOLEAN;
	} else if (clazz == byte.class || clazz == Byte.class) {
		return SimpleType.BYTE;
	} else if (clazz == short.class || clazz == Short.class) {
		return SimpleType.SHORT;
	} else if (clazz == char.class || clazz == Character.class) {
		return SimpleType.CHARACTER;
	} else if (clazz == int.class || clazz == Integer.class) {
		return SimpleType.INTEGER;
	} else if (clazz == long.class || clazz == Long.class) {
		return SimpleType.LONG;
	} else if (clazz == float.class || clazz == Float.class) {
		return SimpleType.FLOAT;
	} else if (clazz == double.class || clazz == Double.class) {
		return SimpleType.DOUBLE;
	} else if (clazz == String.class) {
		return SimpleType.STRING;
	} else {
		throw new IllegalArgumentException("There is no SimpleType for " + clazz.getName());
	}
}
 
源代码4 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType makeSummariesType_4_0_0() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.StreamSummary";
  String description = "StreamSummary";
  String[] itemNames = {
      "tableId",
      "files",
      "totalSize"
  };
  String[] itemDescriptions = {
      "tableId",
      "files",
      "totalSize"
  };
  OpenType[] itemTypes = {
      SimpleType.STRING,
      SimpleType.INTEGER,
      SimpleType.LONG
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码5 项目: dragonwell8_jdk   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码6 项目: jdk8u60   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码7 项目: openjdk-jdk8u   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码8 项目: alfresco-core   文件: JMXUtils.java
public static OpenType<?> getOpenType(Object o)
{
    if(o instanceof Long)
    {
        return SimpleType.LONG;
    }
    else if(o instanceof String)
    {
        return SimpleType.STRING;
    }
    else if(o instanceof Date)
    {
        return SimpleType.DATE;
    }
    else if(o instanceof Integer)
    {
        return SimpleType.INTEGER;
    }
    else if(o instanceof Boolean)
    {
        return SimpleType.BOOLEAN;
    }
    else if(o instanceof Double)
    {
        return SimpleType.DOUBLE;
    }
    else if(o instanceof Float)
    {
        return SimpleType.FLOAT;
    }
    else
    {
        throw new IllegalArgumentException();
    }
}
 
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码10 项目: jdk8u-jdk   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码11 项目: hottub   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码12 项目: jdk8u-dev-jdk   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码13 项目: jdk8u-jdk   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码14 项目: jdk8u_jdk   文件: GcInfoCompositeData.java
static synchronized OpenType[] getBaseGcInfoItemTypes() {
    if (baseGcInfoItemTypes == null) {
        OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
        baseGcInfoItemTypes = new OpenType<?>[] {
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,
            SimpleType.LONG,

            memoryUsageOpenType,
            memoryUsageOpenType,
        };
    }
    return baseGcInfoItemTypes;
}
 
源代码15 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType streamStateType_4_0_0() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.StreamState";
  String description = "StreamState";
  String[] itemNames = {
      "currentRxBytes",
      "currentTxBytes",
      "description",
      "planId",
      "rxPercentage",
      "sessions",
      "totalRxBytes",
      "totalTxBytes",
      "txPercentage"
  };
  String[] itemDescriptions = {
      "currentRxBytes",
      "currentTxBytes",
      "description",
      "planId",
      "rxPercentage",
      "sessions",
      "totalRxBytes",
      "totalTxBytes",
      "txPercentage"
  };
  OpenType[] itemTypes = {
      SimpleType.LONG,
      SimpleType.LONG,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.DOUBLE,
      ArrayType.getArrayType(makeSessionsType4_0()),
      SimpleType.LONG,
      SimpleType.LONG,
      SimpleType.DOUBLE
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码16 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType makeFilesType_4_0_0() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.ProgressInfo";
  String description = "ProgressInfo";
  String[] itemNames = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "peer storage port",
      "planId",
      "sessionIndex",
      "totalBytes"
  };
  String[] itemDescriptions = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "peer storage port",
      "planId",
      "sessionIndex",
      "totalBytes"
  };
  OpenType[] itemTypes = {
      SimpleType.LONG,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.INTEGER,
      SimpleType.STRING,
      SimpleType.INTEGER,
      SimpleType.LONG,
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码17 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType makeFilesType_2_1_20() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.ProgressInfo";
  String description = "ProgressInfo";
  String[] itemNames = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "planId",
      "sessionIndex",
      "totalBytes"
  };
  String[] itemDescriptions = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "planId",
      "sessionIndex",
      "totalBytes"
  };
  OpenType[] itemTypes = {
      SimpleType.LONG,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.INTEGER,
      SimpleType.LONG,
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码18 项目: cassandra-reaper   文件: StreamServiceTest.java
private CompositeType makeFilesType_2_0_17() throws OpenDataException {
  String typeName = "org.apache.cassandra.streaming.ProgressInfo";
  String description = "ProgressInfo";
  String[] itemNames = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "planId",
      "totalBytes"
  };
  String[] itemDescriptions = {
      "currentBytes",
      "direction",
      "fileName",
      "peer",
      "planId",
      "totalBytes"
  };
  OpenType[] itemTypes = {
      SimpleType.LONG,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.STRING,
      SimpleType.LONG,
  };

  return new CompositeType(typeName, description, itemNames, itemDescriptions, itemTypes);
}
 
源代码19 项目: kogito-runtimes   文件: KnowledgeBaseMonitoring.java
/**
 *  Initialize the open mbean metadata
 */
private void initOpenMBeanInfo() {
    OpenMBeanAttributeInfoSupport[] attributes = new OpenMBeanAttributeInfoSupport[4];
    OpenMBeanConstructorInfoSupport[] constructors = new OpenMBeanConstructorInfoSupport[1];
    OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[2];
    MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[0];

    try {
        // Define the attributes 
        attributes[0] = new OpenMBeanAttributeInfoSupport(ATTR_ID,
                                                          "Knowledge Base Id",
                                                          SimpleType.STRING,
                                                          true,
                                                          false,
                                                          false);
        attributes[1] = new OpenMBeanAttributeInfoSupport(ATTR_SESSION_COUNT,
                                                          "Number of created sessions for this Knowledge Base",
                                                          SimpleType.LONG,
                                                          true,
                                                          false,
                                                          false);
        attributes[2] = new OpenMBeanAttributeInfoSupport(ATTR_GLOBALS,
                                                          "List of globals",
                                                           globalsTableType,
                                                           true,
                                                           false,
                                                           false );
        attributes[3] = new OpenMBeanAttributeInfoSupport( ATTR_PACKAGES,
                                                           "List of Packages",
                                                           new ArrayType( 1,
                                                                          SimpleType.STRING ),
                                                           true,
                                                           false,
                                                           false );
        //No arg constructor                
        constructors[0] = new OpenMBeanConstructorInfoSupport( "KnowledgeBaseMonitoringMXBean",
                                                               "Constructs a KnowledgeBaseMonitoringMXBean instance.",
                                                               new OpenMBeanParameterInfoSupport[0] );
        //Operations 
        OpenMBeanParameterInfo[] params = new OpenMBeanParameterInfoSupport[0];
        operations[0] = new OpenMBeanOperationInfoSupport( OP_START_INTERNAL_MBEANS,
                                                           "Creates, registers and starts all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                           params,
                                                           SimpleType.VOID,
                                                           MBeanOperationInfo.INFO );
        operations[1] = new OpenMBeanOperationInfoSupport( OP_STOP_INTERNAL_MBEANS,
                                                           "Stops and disposes all the dependent MBeans that allow monitor all the details in this KnowledgeBase.",
                                                           params,
                                                           SimpleType.VOID,
                                                           MBeanOperationInfo.INFO );

        //Build the info 
        info = new OpenMBeanInfoSupport( this.getClass().getName(),
                                         "Knowledge Base Monitor MXBean",
                                         attributes,
                                         constructors,
                                         operations,
                                         notifications );
    } catch ( Exception e ) {
        e.printStackTrace();
    }
}
 
源代码20 项目: wildfly-core   文件: TypeConverters.java
OpenType<?> getOpenType() {
    return SimpleType.LONG;
}