Java Code Examples for javax.management.openmbean.SimpleType#LONG
The following examples show how to use
javax.management.openmbean.SimpleType#LONG .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 6 votes |
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); }
Example 2
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 6 votes |
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); }
Example 3
Source File: AttributeNodeForSimpleType.java From datakernel with Apache License 2.0 | 6 votes |
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()); } }
Example 4
Source File: ExceptionStatsTest.java From datakernel with Apache License 2.0 | 6 votes |
@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 }; }
Example 5
Source File: GcInfoCompositeData.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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; }
Example 6
Source File: JMXUtils.java From alfresco-core with GNU Lesser General Public License v3.0 | 5 votes |
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(); } }
Example 7
Source File: GcInfoCompositeData.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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; }
Example 8
Source File: GcInfoCompositeData.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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; }
Example 9
Source File: GcInfoCompositeData.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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; }
Example 10
Source File: GcInfoCompositeData.java From hottub with GNU General Public License v2.0 | 5 votes |
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; }
Example 11
Source File: GcInfoCompositeData.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
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; }
Example 12
Source File: GcInfoCompositeData.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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; }
Example 13
Source File: GcInfoCompositeData.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
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; }
Example 14
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 5 votes |
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); }
Example 15
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 5 votes |
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); }
Example 16
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 5 votes |
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); }
Example 17
Source File: StreamServiceTest.java From cassandra-reaper with Apache License 2.0 | 5 votes |
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); }
Example 18
Source File: GcInfoCompositeData.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
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; }
Example 19
Source File: TypeConverters.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
OpenType<?> getOpenType() { return SimpleType.LONG; }
Example 20
Source File: KnowledgeBaseMonitoring.java From kogito-runtimes with Apache License 2.0 | 4 votes |
/** * 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(); } }