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


Java TransactionIsolation类代码示例

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


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

示例1: configureDbConfig

import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
@Override
public void configureDbConfig(ServerConfig config) {
    Validate.notNull(config, "Config cannot be null");

    DataSourceConfig ds = new DataSourceConfig();
    ds.setDriver(configuration.getString("database.driver"));
    ds.setUrl(configuration.getString("database.url"));
    ds.setUsername(configuration.getString("database.username"));
    ds.setPassword(configuration.getString("database.password"));
    ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));

    if (ds.getDriver().contains("sqlite")) {
        config.setDatabasePlatform(new SQLitePlatform());
        config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
    }

    config.setDataSourceConfig(ds);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:19,代码来源:CraftServer.java

示例2: configureDbConfig

import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
public void configureDbConfig(ServerConfig config) {
    Validate.notNull(config, "Config cannot be null");

    DataSourceConfig ds = new DataSourceConfig();
    ds.setDriver(configuration.getString("database.driver"));
    ds.setUrl(configuration.getString("database.url"));
    ds.setUsername(configuration.getString("database.username"));
    ds.setPassword(configuration.getString("database.password"));
    ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));

    if (ds.getDriver().contains("sqlite")) {
        config.setDatabasePlatform(new SQLitePlatform());
        config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
    }

    config.setDataSourceConfig(ds);
}
 
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:18,代码来源:CraftServer.java

示例3: initialize

import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
/**
 * Initialize the contents of the frame.
 */
private void initialize() {
    frame = new JFrame();
    frame.addWindowListener(new WindowAdapter() {
        @Override
        public void windowOpened(WindowEvent e) {
            ServerConfig config = new ServerConfig();
            config.setDefaultServer(true);
            final DataSourceConfig dataSourceConfig = new DataSourceConfig();
            dataSourceConfig
                    .setUrl("jdbc:sqlite:C:/Users/markus/Entwickeln/Java/CraftBukkitTestServer/plugins/SmoothWorldUpdater/SmoothWorldUpdater.db");
            dataSourceConfig.setDriver("org.sqlite.JDBC");
            dataSourceConfig.setMinConnections(1);
            dataSourceConfig.setMaxConnections(25);
            dataSourceConfig.setUsername("");
            dataSourceConfig.setPassword("");
            dataSourceConfig.setIsolationLevel(TransactionIsolation
                    .getLevel("READ_UNCOMMITTED"));
            config.setName("default");
            config.setDataSourceConfig(dataSourceConfig);
            config.addClass(de.hapm.swu.data.ChunkInfo.class);
            config.addClass(de.hapm.swu.data.ChunkInfoId.class);
            config.addClass(de.hapm.swu.data.BlockTypeInfo.class);
            config.addClass(de.hapm.swu.data.WorldInfo.class);
            server = EbeanServerFactory.create(config);
            visualizer = new ChunkInfoVisualizer();
            visualizer.setProvider(new EbeanChunkInfoProvider(server));
            chunkInfoPanel.setVisualizer(visualizer);
            chunkInfoPanel.start();
        }
    });
    frame.setBounds(100, 100, 450, 300);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    chunkInfoPanel = new ChunkInfoVisualizerPanel();
    frame.getContentPane().add(chunkInfoPanel, BorderLayout.CENTER);
}
 
开发者ID:hapm,项目名称:swu,代码行数:40,代码来源:ChunkVisualizerMainForm.java

示例4: configureDbConfig

import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
public void configureDbConfig(ServerConfig config) {
    DataSourceConfig ds = new DataSourceConfig();
    ds.setDriver(configuration.getString("database.driver"));
    ds.setUrl(configuration.getString("database.url"));
    ds.setUsername(configuration.getString("database.username"));
    ds.setPassword(configuration.getString("database.password"));
    ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));

    if (ds.getDriver().contains("sqlite")) {
        config.setDatabasePlatform(new SQLitePlatform());
        config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
    }

    config.setDataSourceConfig(ds);
}
 
开发者ID:agaricusb,项目名称:MCPBukkit,代码行数:16,代码来源:CraftServer.java


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