本文整理匯總了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;
}