Java 8 TabularDataSupport - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 TabularDataSupport class.

This code example shows how to use the following methods:
    protected abstract void collectCheckpoints(TabularDataSupport tab) throws OpenDataException;
 
    @Override 
    public TabularData listCheckpoints() {
        try { 
            TabularDataSupport tab = new TabularDataSupport(
                    new TabularType(SegmentCheckpointMBean.class.getName(),
                            "Checkpoints", TYPE, new String[] { "id" }));
 
            collectCheckpoints(tab);
 
            return tab;
        } catch (OpenDataException e) {
            throw new IllegalStateException(e);
        } 
    } 
 
    /** 
     * Utility method for converting the fields associated with a checkpoint to the 
     * composite data format. 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:put
                new String[] {"Key", "Value", "Type"},
                new String[] {"X", "X", "X"},
                new OpenType<?>[] {SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
        TabularType tt = new TabularType("PROPERTIES", "X", ct, new String [] {"Key"});
 
        TabularDataSupport tds = new TabularDataSupport(tt);
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("Key", "foo"); 
        data.put("Value", "bar"); 
        data.put("Type", "String"); 
        CompositeDataSupport cds = new CompositeDataSupport(ct, data);
        tds.put(cds);
 
        assertJmxInvoke(shouldSucceed, connection, mbean, "update", new Object [] {pid, tds}, new String [] {String.class.getName(), TabularData.class.getName()});
        TabularData td = (TabularData) connection.invoke(mbean, "getProperties", new Object [] {pid}, new String [] {String.class.getName()});
        if (shouldSucceed) {
            assertEquals("bar", td.get(new Object[] {"foo"}).get("Value"));
        } 
 
        String[][] configs = (String[][]) connection.invoke(mbean, "getConfigurations", new Object [] {"(service.pid=" + pid + ")"}, new String [] {String.class.getName()});
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:size
        try { 
            connector = getJMXConnector();
            MBeanServerConnection connection = connector.getMBeanServerConnection();
            ObjectName name = new ObjectName("org.apache.karaf:type=bundle,name=root");
            TabularDataSupport value = (TabularDataSupport) connection.getAttribute(name, "Bundles");
            assertTrue(value.size() > 0);
        } finally { 
        	close(connector);
        } 
    } 
 
    @Test
    public void capabilitiesCommand() throws Exception {
        String allCapabilitiesOutput = executeCommand("bundle:capabilities");
        System.out.println(allCapabilitiesOutput);
        assertFalse(allCapabilitiesOutput.isEmpty());
        String jmxWhiteboardBundleCapabilitiesOutput = executeCommand("bundle:capabilities org.apache.aries.jmx.whiteboard");
        System.out.println(jmxWhiteboardBundleCapabilitiesOutput);
        assertTrue(jmxWhiteboardBundleCapabilitiesOutput.contains("osgi.wiring.bundle; org.apache.aries.jmx.whiteboard 1.0.0 [UNUSED]"));
    } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * newTabularDataInstance 
	 */ 
	public static TabularData newTabularDataInstance() {
		return new TabularDataSupport( TABULAR_TYPE );
	} 
 
	/** 
	 * fromTabularData 
	 */ 
	public static QueryStats[] fromTabularData(final TabularData tabularData) {
		final List<QueryStats> countList = new ArrayList( tabularData.size() );
		for ( final Iterator pos = tabularData.values().iterator(); pos.hasNext(); ) {
			countList.add( new QueryStats( (CompositeData) pos.next() ) );
		} 
		return countList.toArray( new QueryStats[countList.size()] );
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * @return tabular data 
	 */ 
	public static TabularData newTabularDataInstance() {
		return new TabularDataSupport( TABULAR_TYPE );
	} 
 
	/** 
	 * @param tabularData 
	 * 
	 * @return array of region statistics 
	 */ 
	public static CacheRegionStats[] fromTabularData(final TabularData tabularData) {
		final List<CacheRegionStats> countList = new ArrayList( tabularData.size() );
		for ( final Iterator pos = tabularData.values().iterator(); pos.hasNext(); ) {
			countList.add( new CacheRegionStats( (CompositeData) pos.next() ) );
		} 
		return countList.toArray( new CacheRegionStats[countList.size()] );
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * newTabularDataInstance 
	 */ 
	public static TabularData newTabularDataInstance() {
		return new TabularDataSupport( TABULAR_TYPE );
	} 
 
	/** 
	 * fromTabularData 
	 */ 
	public static EntityStats[] fromTabularData(final TabularData tabularData) {
		final List<EntityStats> countList = new ArrayList( tabularData.size() );
		for ( final Iterator pos = tabularData.values().iterator(); pos.hasNext(); ) {
			countList.add( new EntityStats( (CompositeData) pos.next() ) );
		} 
		return countList.toArray( new EntityStats[countList.size()] );
	} 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	/** 
	 * newTabularDataInstance 
	 */ 
	public static TabularData newTabularDataInstance() {
		return new TabularDataSupport( TABULAR_TYPE );
	} 
 
	/** 
	 * fromTabularData 
	 */ 
	public static CollectionStats[] fromTabularData(final TabularData tabularData) {
		final List<CollectionStats> countList = new ArrayList( tabularData.size() );
		for ( final Iterator pos = tabularData.values().iterator(); pos.hasNext(); ) {
			countList.add( new CollectionStats( (CompositeData) pos.next() ) );
		} 
		return countList.toArray( new CollectionStats[countList.size()] );
	} 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 TabularDataSupport Methods: