当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionProperties类代码示例

本文整理汇总了Java中com.owera.common.db.ConnectionProperties的典型用法代码示例。如果您正苦于以下问题:Java ConnectionProperties类的具体用法?Java ConnectionProperties怎么用?Java ConnectionProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ConnectionProperties类属于com.owera.common.db包,在下文中一共展示了ConnectionProperties类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DBI

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public DBI(int lifetimeSec, ConnectionProperties connectionProperties, Syslog syslog) throws NoAvailableConnectionException, SQLException {
	this.cp = connectionProperties;
	this.lifetimeSec = lifetimeSec;
	this.syslog = syslog;
	populateInboxes();
	publishInbox.deleteReadMessage();
	this.sleep = new Sleep(1000, 1000, true);
	this.xaps = new XAPS(cp, syslog);
	this.dbiId = random.nextInt(1000000);
	xaps.setDbi(this);
	publishInbox.addFilter(new Message(null, Message.MTYPE_PUB_ADD, null, null));
	publishInbox.addFilter(new Message(null, Message.MTYPE_PUB_CHG, null, null));
	publishInbox.addFilter(new Message(null, Message.MTYPE_PUB_DEL, null, null));
	registerInbox(PUBLISH_INBOX_NAME, publishInbox);
	Thread t = new Thread(this);
	if (syslog != null)
		t.setName("DBI for " + syslog.getIdentity().getFacilityName());
	else
		t.setName("DBI");
	t.setDaemon(true);
	t.start();
	logger.debug("DBI is loaded for user " + syslog.getIdentity().getUser().getFullname());
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:24,代码来源:DBI.java

示例2: XAPSUnit

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public XAPSUnit(ConnectionProperties connectionProperties, XAPS xaps, Syslog syslog) throws NoAvailableConnectionException, SQLException {
	this.connectionProperties = connectionProperties;
	this.syslog = syslog;
	if (xaps == null)
		throw new IllegalArgumentException("The XAPSUnit constructor requires a non-null XAPS object");
	this.xaps = xaps;
	if (xaps.getUnittypes() == null) {
		xaps.read();
	}
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:11,代码来源:XAPSUnit.java

示例3: XAPS

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public XAPS(ConnectionProperties connectionProperties, Syslog syslog) throws NoAvailableConnectionException, SQLException {
	long start = System.currentTimeMillis();
	this.connectionProperties = connectionProperties;
	this.syslog = syslog;
	/* Checks all necessary tables to see which version they're in */
	XAPSVersionCheck.versionCheck(connectionProperties);
	this.unittypes = read();
	if (logger.isDebugEnabled()) {

		logger.debug("Read XAPS object in " + (System.currentTimeMillis() - start) + " ms.");
	}
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:13,代码来源:XAPS.java

示例4: ReportGenerator

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ReportGenerator(ConnectionProperties sysCp, ConnectionProperties xapsCp, XAPS xaps, String logPrefix, Identity id) {
	this.sysCp = sysCp;
	this.xapsCp = xapsCp;
	this.xaps = xaps;
	this.id = id;
	if (logPrefix != null)
		this.logPrefix = logPrefix;

}
 
开发者ID:freeacs,项目名称:dbi,代码行数:10,代码来源:ReportGenerator.java

示例5: doGet

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
/**
 * doGet prints some information about the server, focus on database connections and memory usage
 */
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
	if (req.getParameter("clearCache") != null)
		BaseCache.clearCache();
	PrintWriter pw = res.getWriter();
	String html = "";
	html += "<title>xAPS TR-069 Server Monitoring Page</title>";
	html += "<h1>Monitoring of the TR-069 Server v. " + VERSION + "</h1>";
	ConnectionProperties props = DBAccess.getXAPSProperties();
	ConnectionPoolData poolData = ConnectionProvider.getConnectionPoolData(props);
	if (poolData != null) {
		html += "<h1>Database connection</h1>\n";
		html += "This server is connected to " + poolData.getProps().getUrl() + " with user " + poolData.getProps().getUser() + "<br>\n";
		ConnectionMetaData metaData = poolData.getMetaData().clone();
		html += "<ul>Accessed   : " + metaData.getAccessed() + "<br>\n";
		html += "Retries        : " + metaData.getRetries() + "<br>\n";
		html += "Denied         : " + metaData.getDenied() + "<br>\n";
		html += "Denied %       : " + metaData.calculateDeniedPercent() + "<br>\n";
		html += "Free           : " + poolData.getFreeConn().size() + "<br>\n";
		html += "Currently used : " + poolData.getUsedConn().size() + "<br>\n";
		html += "Used %         : " + metaData.calculateUsedPercent() + "<br>\n<ul>";
		int[] accessedSim = metaData.getAccessedSim();
		for (int i = 1; i < accessedSim.length; i++) {
			if (accessedSim[i] == 0 && accessedSim[i + 1] == 0 && accessedSim[i + 2] == 0)
				break;
			float percent = ((float) accessedSim[i] / metaData.getAccessed()) * 100f;
			html += String.format("Used " + i + " connection(s) simultaneously: %8.5f", percent);
			html += "% (accessed: " + accessedSim[i] + ")<br>\n";
		}
		html += "</ul>\n</ul><br>\n";
	}
	long total = Runtime.getRuntime().totalMemory();
	long free = Runtime.getRuntime().freeMemory();
	long used = total - free;
	html += "<h1>Memory Usage</h1>\n";
	html += "The JVM uses " + getBytesFormatted(used) + " of memory. " + getBytesFormatted(free) + " of memory available on the heap.<br>";
	pw.print(html);
}
 
开发者ID:freeacs,项目名称:tr069,代码行数:41,代码来源:Provisioning.java

示例6: UnitJobs

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public UnitJobs(ConnectionProperties cp) {
	this.connectionProperties = cp;
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:UnitJobs.java

示例7: Permissions

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
protected Permissions(ConnectionProperties cp) {
	//		this.user = user;
	this.connectionProperties = cp;
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:5,代码来源:Permissions.java

示例8: ScriptExecutions

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ScriptExecutions(ConnectionProperties connectionProperties) {
	this.connectionProperties = connectionProperties;
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:ScriptExecutions.java

示例9: getConnectionProperties

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ConnectionProperties getConnectionProperties() {
	return connectionProperties;
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:XAPS.java

示例10: Users

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public Users(ConnectionProperties cp) throws SQLException, NoAvailableConnectionException {
	XAPSVersionCheck.versionCheck(cp);
	this.connectionProperties = cp;
	readAllUsers();
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:6,代码来源:Users.java

示例11: getConnectionProperties

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
protected ConnectionProperties getConnectionProperties() {
	return connectionProperties;
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:Users.java

示例12: ReportSyslogGenerator

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ReportSyslogGenerator(ConnectionProperties sysCp, ConnectionProperties xapsCp, XAPS xaps, String logPrefix, Identity id) {
	super(sysCp, xapsCp, xaps, logPrefix, id);
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:ReportSyslogGenerator.java

示例13: ReportProvisioningGenerator

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ReportProvisioningGenerator(ConnectionProperties sysCp, ConnectionProperties xapsCp, XAPS xaps, String logPrefix, Identity id) {
	super(sysCp, xapsCp, xaps, logPrefix, id);
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:ReportProvisioningGenerator.java

示例14: ReportVoipGenerator

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ReportVoipGenerator(ConnectionProperties sysCp, ConnectionProperties xapsCp, XAPS xaps, String logPrefix, Identity id) {
	super(sysCp, xapsCp, xaps, logPrefix, id);
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:ReportVoipGenerator.java

示例15: ReportVoipCallGenerator

import com.owera.common.db.ConnectionProperties; //导入依赖的package包/类
public ReportVoipCallGenerator(ConnectionProperties sysCp, ConnectionProperties xapsCp, XAPS xaps, String logPrefix, Identity id) {
	super(sysCp, xapsCp, xaps, logPrefix, id);
}
 
开发者ID:freeacs,项目名称:dbi,代码行数:4,代码来源:ReportVoipCallGenerator.java


注:本文中的com.owera.common.db.ConnectionProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。