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


Java HsqlProperties.delimitedArgPairsToProps方法代码示例

本文整理汇总了Java中org.hsqldb.persist.HsqlProperties.delimitedArgPairsToProps方法的典型用法代码示例。如果您正苦于以下问题:Java HsqlProperties.delimitedArgPairsToProps方法的具体用法?Java HsqlProperties.delimitedArgPairsToProps怎么用?Java HsqlProperties.delimitedArgPairsToProps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.persist.HsqlProperties的用法示例。


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

示例1: putPropertiesFromString

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
 * Puts properties from the supplied string argument.  The relevant
 * key value pairs are the same as those for the (web)server.properties
 * file format, except that the 'server.' prefix should not be specified.
 *
 * @param s semicolon-delimited key=value pair string,
 *      e.g. silent=false;port=8080;...
 * @throws HsqlException if this server is running
 *
 * @jmx.managed-operation
 *   impact="ACTION"
 *   description="'server.' key prefix automatically supplied"
 *
 * @jmx.managed-operation-parameter
 *   name="s"
 *   type="java.lang.String"
 *   position="0"
 *   description="semicolon-delimited key=value pairs"
 */
public void putPropertiesFromString(String s) {

    if (getState() != ServerConstants.SERVER_STATE_SHUTDOWN) {
        throw Error.error(ErrorCode.GENERAL_ERROR);
    }

    if (StringUtil.isEmpty(s)) {
        return;
    }

    printWithThread("putPropertiesFromString(): [" + s + "]");

    HsqlProperties p = HsqlProperties.delimitedArgPairsToProps(s, "=",
        ";", ServerProperties.sc_key_prefix);

    try {
        setProperties(p);
    } catch (Exception e) {
        throw Error.error(e, ErrorCode.GENERAL_ERROR,
                          ErrorCode.M_Message_Pair,
                          new String[]{ "Failed to set properties" });
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:43,代码来源:Server.java

示例2: putPropertiesFromString

import org.hsqldb.persist.HsqlProperties; //导入方法依赖的package包/类
/**
 * Puts properties from the supplied string argument.  The relevant
 * key value pairs are the same as those for the (web)server.properties
 * file format, except that the 'server.' prefix should not be specified.
 *
 * @param s semicolon-delimited key=value pair string,
 *      e.g. k1=v1;k2=v2;k3=v3...
 * @throws RuntimeException if this server is running
 *
 * @jmx.managed-operation
 *   impact="ACTION"
 *   description="'server.' key prefix automatically supplied"
 *
 * @jmx.managed-operation-parameter
 *   name="s"
 *   type="java.lang.String"
 *   position="0"
 *   description="semicolon-delimited key=value pairs"
 */
public void putPropertiesFromString(String s) {

    if (getState() != ServerConstants.SERVER_STATE_SHUTDOWN) {
        throw new RuntimeException();
    }

    if (StringUtil.isEmpty(s)) {
        return;
    }

    printWithThread("putPropertiesFromString(): [" + s + "]");

    HsqlProperties p = HsqlProperties.delimitedArgPairsToProps(s, "=",
        ";", ServerConstants.SC_KEY_PREFIX);

    try {
        setProperties(p);
    } catch (Exception e) {
        throw new RuntimeException("Failed to set properties: " + e);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:41,代码来源:Server.java


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