Package org.lightfish.business.servermonitoring.entity

Examples of org.lightfish.business.servermonitoring.entity.ConnectionPool


        int numconnfree = getIntVal(entity, "numconnfree", "current");
        int numconnused = getIntVal(entity, "numconnused", "current");
        int waitqueuelength = getIntVal(entity, "waitqueuelength", "count");
        int numpotentialconnleak = getIntVal(entity, "numpotentialconnleak", "count");

        return new DataPoint<>(resourceName, new ConnectionPool(resourceName, numconnfree, numconnused, waitqueuelength, numpotentialconnleak));
    }
View Full Code Here


                Application combinedApp = new Application(application.getApplicationName(), application.getComponents());
                applications.put(application.getApplicationName(), combinedApp);
            }

            for (ConnectionPool currentPool : current.getPools()) {
                ConnectionPool combinedPool = pools.get(currentPool.getJndiName());
                if (combinedPool == null) {
                    combinedPool = new ConnectionPool();
                    combinedPool.setJndiName(currentPool.getJndiName());
                    pools.put(currentPool.getJndiName(), combinedPool);
                }
                combinedPool.setNumconnfree(currentPool.getNumconnfree() + combinedPool.getNumconnfree());
                combinedPool.setNumconnused(currentPool.getNumconnused() + combinedPool.getNumconnused());
                combinedPool.setNumpotentialconnleak(currentPool.getNumpotentialconnleak() + combinedPool.getNumpotentialconnleak());
                combinedPool.setWaitqueuelength(currentPool.getWaitqueuelength() + combinedPool.getWaitqueuelength());
            }

            //logs.addAll(current.getLogRecords());
        }
View Full Code Here

    @Test
    public void basic_subvalue_replace() throws Exception {
        String expected = "Free Connections: 42";
        String template = "Free Connections: ${pools[0].numconnfree}";
        List<ConnectionPool> pools = new ArrayList<>();
        pools.add(new ConnectionPool("anything", 42, 24, 1, 1));

        Snapshot snapshot = new Snapshot.Builder().pools(pools).build();
        String result = instance.processBasicMessage(template, snapshot);
        assertEquals(expected, result);
    }
View Full Code Here

        String expected = "<h3>Free Connections</h3>\n"
                + "<pre><code>42\n"
                + "</code></pre>";
        String template = "### Free Connections\n    ${pools[0].numconnfree}";
        List<ConnectionPool> pools = new ArrayList<>();
        pools.add(new ConnectionPool("anything", 42, 24, 1, 1));

        Snapshot snapshot = new Snapshot.Builder().pools(pools).build();
        String result = instance.processRichMessage(template, snapshot);
        System.out.println(result);
        assertEquals(expected, result);
View Full Code Here

TOP

Related Classes of org.lightfish.business.servermonitoring.entity.ConnectionPool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.