本文整理汇总了Java中org.hsqldb.persist.HsqlProperties.getIntegerProperty方法的典型用法代码示例。如果您正苦于以下问题:Java HsqlProperties.getIntegerProperty方法的具体用法?Java HsqlProperties.getIntegerProperty怎么用?Java HsqlProperties.getIntegerProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.persist.HsqlProperties
的用法示例。
在下文中一共展示了HsqlProperties.getIntegerProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
public static void main(String[] argv) {
TestCacheSize test = new TestCacheSize();
HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");
test.bigops = props.getIntegerProperty("test.bigops", test.bigops);
test.bigrows = test.bigops;
test.smallops = test.bigops / 8;
test.cacheScale = props.getIntegerProperty("test.scale",
test.cacheScale);
test.tableType = props.getProperty("test.tabletype", test.tableType);
test.nioMode = props.isPropertyTrue("test.nio", test.nioMode);
if (props.getProperty("test.dbtype", "").equals("mem")) {
test.filepath = "mem:test";
test.filedb = false;
test.shutdown = false;
}
test.setUp();
StopWatch sw = new StopWatch();
test.testFillUp();
test.checkResults();
long time = sw.elapsedTime();
test.storeResult("total test time", 0, (int) time, 0);
System.out.println("total test time -- " + sw.elapsedTime() + " ms");
test.tearDown();
}
示例2: main
import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
public static void main(String[] argv) {
TestCacheSize test = new TestCacheSize();
HsqlProperties props = HsqlProperties.argArrayToProps(argv, "test");
test.bigops = props.getIntegerProperty("test.bigops", test.bigops);
test.bigrows = test.bigops;
test.smallops = test.bigops / 8;
test.cacheScale = props.getIntegerProperty("test.scale",
test.cacheScale);
test.logType = props.getProperty("test.logtype", test.logType);
test.tableType = props.getProperty("test.tabletype", test.tableType);
test.nioMode = props.isPropertyTrue("test.nio", test.nioMode);
if (props.getProperty("test.dbtype", "").equals("mem")) {
test.filepath = "mem:test";
test.filedb = false;
test.shutdown = false;
}
test.setUp();
StopWatch sw = new StopWatch();
test.testFillUp();
test.checkResults();
long time = sw.elapsedTime();
test.storeResult("total test time", 0, (int) time, 0);
System.out.println("total test time -- " + sw.elapsedTime() + " ms");
test.tearDown();
}
示例3: JDBCConnection
import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
* Constructs a new external <code>Connection</code> to an HSQLDB
* <code>Database</code>. <p>
*
* This constructor is called on behalf of the
* <code>java.sql.DriverManager</code> when getting a
* <code>Connection</code> for use in normal (external)
* client code. <p>
*
* Internal client code, that being code located in HSQLDB SQL
* functions and stored procedures, receives an INTERNAL
* connection constructed by the {@link
* #JDBCConnection(org.hsqldb.SessionInterface)
* JDBCConnection(SessionInterface)} constructor. <p>
*
* @param props A <code>Properties</code> object containing the connection
* properties
* @exception SQLException when the user/password combination is
* invalid, the connection url is invalid, or the
* <code>Database</code> is unavailable. <p>
*
* The <code>Database</code> may be unavailable for a number
* of reasons, including network problems or the fact that it
* may already be in use by another process.
*/
public JDBCConnection(HsqlProperties props) throws SQLException {
String user = props.getProperty("user");
String password = props.getProperty("password");
String connType = props.getProperty("connection_type");
String host = props.getProperty("host");
int port = props.getIntegerProperty("port", 0);
String path = props.getProperty("path");
String database = props.getProperty("database");
boolean isTLS = (connType == DatabaseURL.S_HSQLS
|| connType == DatabaseURL.S_HTTPS);
if (user == null) {
user = "SA";
}
if (password == null) {
password = "";
}
Calendar cal = Calendar.getInstance();
int zoneSeconds = HsqlDateTime.getZoneSeconds(cal);
try {
if (DatabaseURL.isInProcessDatabaseType(connType)) {
/**
* @todo fredt - this should be the only static reference to a core class in
* the jdbc package - we may make it dynamic
*/
sessionProxy = DatabaseManager.newSession(connType, database,
user, password, props, zoneSeconds);
} else { // alias: type not yet implemented
throw Util.invalidArgument(connType);
}
connProperties = props;
} catch (HsqlException e) {
throw Util.sqlException(e);
}
}
示例4: jdbcConnection
import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
* Constructs a new external <code>Connection</code> to an HSQLDB
* <code>Database</code>. <p>
*
* This constructor is called on behalf of the
* <code>java.sql.DriverManager</code> when getting a
* <code>Connection</code> for use in normal (external)
* client code. <p>
*
* Internal client code, that being code located in HSQLDB SQL
* functions and stored procedures, receives an INTERNAL
* connection constructed by the {@link #jdbcConnection(Session)
* jdbcConnection(Session)} constructor. <p>
*
* @param props A <code>Properties</code> object containing the connection
* properties
* @exception SQLException when the user/password combination is
* invalid, the connection url is invalid, or the
* <code>Database</code> is unavailable. <p>
*
* The <code>Database</code> may be unavailable for a number
* of reasons, including network problems or the fact that it
* may already be in use by another process.
*/
public jdbcConnection(HsqlProperties props) throws SQLException {
String user = props.getProperty("user");
String password = props.getProperty("password");
String connType = props.getProperty("connection_type");
String host = props.getProperty("host");
int port = props.getIntegerProperty("port", 0);
String path = props.getProperty("path");
String database = props.getProperty("database");
boolean isTLS = (connType == DatabaseURL.S_HSQLS
|| connType == DatabaseURL.S_HTTPS);
if (user == null) {
user = "SA";
}
if (password == null) {
password = "";
}
user = user.toUpperCase(Locale.ENGLISH);
password = password.toUpperCase(Locale.ENGLISH);
try {
if (DatabaseURL.isInProcessDatabaseType(connType)) {
/** @todo fredt - this should be the only static reference to a core class in
* the jdbc package - we may make it dynamic */
sessionProxy = DatabaseManager.newSession(connType, database,
user, password, props);
} else if (connType == DatabaseURL.S_HSQL
|| connType == DatabaseURL.S_HSQLS) {
sessionProxy = new HSQLClientConnection(host, port, path,
database, isTLS, user, password);
isNetConn = true;
} else if (connType == DatabaseURL.S_HTTP
|| connType == DatabaseURL.S_HTTPS) {
sessionProxy = new HTTPClientConnection(host, port, path,
database, isTLS, user, password);
isNetConn = true;
} else { // alias: type not yet implemented
throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT);
}
connProperties = props;
} catch (HsqlException e) {
throw Util.sqlException(e);
}
}