Package com.alibaba.druid.support.monitor.entity

Examples of com.alibaba.druid.support.monitor.entity.MonitorInstance


        return app;
    }

    public void insertOrUpdateInstance(String domain, String app, String cluster, String host, String ip,
                                       Date startTime, long pid) throws SQLException {
        MonitorInstance monitorInst = findInst(domain, app, cluster, host);
        if (monitorInst == null) {
            String sql = "insert into druid_inst (domain, app, cluster, host, ip, lastActiveTime, lastPID) " //
                         + " values (?, ?, ?, ?, ?, ?, ?)";
            JdbcUtils.execute(dataSource, sql, domain, app, cluster, host, ip, startTime, pid);
        } else {
View Full Code Here


            JdbcUtils.close(conn);
        }
    }

    private MonitorInstance readInst(ResultSet rs) throws SQLException {
        MonitorInstance inst = new MonitorInstance();

        inst.setId(rs.getLong(1));
        inst.setDomain(rs.getString(2));
        inst.setApp(rs.getString(3));
        inst.setCluster(rs.getString(4));
        inst.setHost(rs.getString(5));

        inst.setIp(rs.getString(6));
        inst.setLastActiveTime(rs.getTimestamp(7));
        inst.setLastPID(rs.getLong(8));

        return inst;
    }
View Full Code Here

        return app;
    }

    public void insertOrUpdateInstance(String domain, String app, String cluster, String host, String ip,
                                       Date startTime, long pid) throws SQLException {
        MonitorInstance monitorInst = findInst(domain, app, cluster, host);
        if (monitorInst == null) {
            String sql = "insert into druid_inst (domain, app, cluster, host, ip, lastActiveTime, lastPID) " //
                         + " values (?, ?, ?, ?, ?, ?, ?)";
            JdbcUtils.execute(dataSource, sql, domain, app, cluster, host, ip, startTime, pid);
        } else {
View Full Code Here

            JdbcUtils.close(conn);
        }
    }

    private MonitorInstance readInst(ResultSet rs) throws SQLException {
        MonitorInstance inst = new MonitorInstance();

        inst.setId(rs.getLong(1));
        inst.setDomain(rs.getString(2));
        inst.setApp(rs.getString(3));
        inst.setCluster(rs.getString(4));
        inst.setHost(rs.getString(5));

        inst.setIp(rs.getString(6));
        inst.setLastActiveTime(rs.getTimestamp(7));
        inst.setLastPID(rs.getLong(8));

        return inst;
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.support.monitor.entity.MonitorInstance

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.