本文整理汇总了Java中com.wix.mysql.distribution.Version类的典型用法代码示例。如果您正苦于以下问题:Java Version类的具体用法?Java Version怎么用?Java Version使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Version类属于com.wix.mysql.distribution包,在下文中一共展示了Version类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TestMetastoreDatabaseServer
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
TestMetastoreDatabaseServer(Config dbConfig) throws Exception {
Config realConfig = dbConfig.withFallback(getDefaultConfig()).getConfig(CONFIG_PREFIX);
this.embeddedMysqlEnabled = realConfig.getBoolean(EMBEDDED_MYSQL_ENABLED_KEY);
this.dbUserName = realConfig.getString(DBUSER_NAME_KEY);
this.dbUserPassword = realConfig.getString(DBUSER_PASSWORD_KEY);
this.dbHost = this.embeddedMysqlEnabled ? "localhost" : realConfig.getString(DBHOST_KEY);
this.dbPort = this.embeddedMysqlEnabled ? chooseRandomPort() : realConfig.getInt(DBPORT_KEY);
this.log.error("Starting with config: embeddedMysqlEnabled={} dbUserName={} dbHost={} dbPort={}",
this.embeddedMysqlEnabled,
this.dbUserName,
this.dbHost,
this.dbPort);
config = MysqldConfig.aMysqldConfig(Version.v5_6_latest)
.withPort(this.dbPort)
.withUser(this.dbUserName, this.dbUserPassword)
.build();
if (this.embeddedMysqlEnabled) {
testingMySqlServer = EmbeddedMysql.anEmbeddedMysql(config).start();
}
else {
testingMySqlServer = null;
}
}
示例2: anEmbeddedMysql
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
public static Builder anEmbeddedMysql(
final Version version,
final AdditionalConfig... additionalConfigs) {
MysqldConfig mysqldConfig = MysqldConfig.aMysqldConfig(version).build();
DownloadConfig downloadConfig = resolveDownloadConfig(additionalConfigs);
return new Builder(mysqldConfig, downloadConfig);
}
示例3: main
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
public static void main(String[] args) {
DownloadConfig downloadConfig = aDownloadConfig().withCacheDir(args[0]).build();
MysqldConfig mysqldConfig = MysqldConfig.aMysqldConfig(Version.valueOf(version(args))).build();
IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder().defaults(mysqldConfig, downloadConfig).build();
MysqldStarter mysqldStarter = new MysqldStarter(runtimeConfig);
mysqldStarter.prepare(mysqldConfig);
}
示例4: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Version version) {
return Platform.detect().isUnixLike();
}
示例5: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Version version) {
return version.getMajorVersion().equals("5.7");
}
示例6: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Version version) {
return Platform.detect().isUnixLike() &&
(version.getMajorVersion().equals("5.6") || version.getMajorVersion().equals("5.5"));
}
示例7: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Version version) {
return version.getMajorVersion().equals("5.5") || version.getMajorVersion().equals("5.6");
}
示例8: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Version version) {
return true;
}
示例9: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike()
&& Objects.equals(version.getMajorVersion(), "5.7")
&& version.getMinorVersion() <= 17;
}
示例10: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return !platform.isUnixLike() &&
Objects.equals(version.getMajorVersion(), "5.7") &&
version.getMinorVersion() <= 17;
}
示例11: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike()
&& Objects.equals(version.getMajorVersion(), "5.7")
&& version.getMinorVersion() > 17;
}
示例12: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return !platform.isUnixLike() && Objects.equals(version.getMajorVersion(), "5.6");
}
示例13: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike() && Objects.equals(version.getMajorVersion(), "5.5");
}
示例14: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike() && Objects.equals(version.getMajorVersion(), "5.6");
}
示例15: matches
import com.wix.mysql.distribution.Version; //导入依赖的package包/类
@Override
public boolean matches(Platform platform, Version version) {
return !platform.isUnixLike()
&& Objects.equals(version.getMajorVersion(), "5.7")
&& version.getMinorVersion() > 17;
}