本文整理汇总了Java中jetbrains.buildServer.serverSide.TeamCityProperties.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java TeamCityProperties.getBoolean方法的具体用法?Java TeamCityProperties.getBoolean怎么用?Java TeamCityProperties.getBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.serverSide.TeamCityProperties
的用法示例。
在下文中一共展示了TeamCityProperties.getBoolean方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPreSignedUrl
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
@NotNull
@Override
public String getPreSignedUrl(@NotNull HttpMethod httpMethod, @NotNull String bucketName, @NotNull String objectKey, @NotNull Map<String, String> params) throws IOException {
try {
final Callable<String> resolver = () -> S3Util.withS3Client(params, client -> {
final GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucketName, objectKey, httpMethod)
.withExpiration(new Date(System.currentTimeMillis() + getUrlLifetimeSec() * 1000));
return client.generatePresignedUrl(request).toString();
});
if (httpMethod == HttpMethod.GET) {
return TeamCityProperties.getBoolean(TEAMCITY_S3_PRESIGNURL_GET_CACHE_ENABLED)
? myGetLinksCache.get(getCacheIdentity(params, objectKey, bucketName), resolver)
: resolver.call();
} else {
return resolver.call();
}
} catch (Exception e) {
final AWSException awsException = new AWSException(e.getCause());
if (StringUtil.isNotEmpty(awsException.getDetails())) {
LOG.warn(awsException.getDetails());
}
final String err = "Failed to create " + httpMethod.name() + " pre-signed URL for [" + objectKey + "] in bucket [" + bucketName + "]";
LOG.infoAndDebugDetails(err, awsException);
throw new IOException(err + ": " + awsException.getMessage(), awsException);
}
}
开发者ID:JetBrains,项目名称:teamcity-s3-artifact-storage-plugin,代码行数:27,代码来源:S3PreSignedUrlProviderImpl.java
示例2: canStartNewInstance
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
public synchronized boolean canStartNewInstance() {
if (getErrorInfo() != null){
LOG.debug("Can't start new instance, if image is erroneous");
return false;
}
if (myImageDetails.getBehaviour().isUseOriginal()) {
final VmwareCloudInstance myInstance = findInstanceById(myImageDetails.getSourceId());
if (myInstance == null) {
return false;
}
return myInstance.getStatus() == InstanceStatus.STOPPED;
}
final boolean countStoppedVmsInLimit = TeamCityProperties.getBoolean(VmwareConstants.CONSIDER_STOPPED_VMS_LIMIT)
&& myImageDetails.getBehaviour().isDeleteAfterStop();
final List<String> consideredInstances = new ArrayList<String>();
for (VmwareCloudInstance instance : getInstances()) {
if (instance.getStatus() != InstanceStatus.STOPPED || countStoppedVmsInLimit)
consideredInstances.add(instance.getInstanceId());
}
final boolean canStartMore = consideredInstances.size() < myImageDetails.getMaxInstances();
LOG.debug(String.format("[%s] Instances count: %d %s, can start more: %s", myImageDetails.getSourceId(),
consideredInstances.size(), Arrays.toString(consideredInstances.toArray()), String.valueOf(canStartMore)));
return canStartMore;
}
示例3: getIsUiForBuildStepsSupported
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
public boolean getIsUiForBuildStepsSupported() {
return TeamCityProperties.getBoolean(Constants.RUN_AS_UI_STEPS_ENABLED);
}
示例4: getIsAclConfiguringSupported
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
public boolean getIsAclConfiguringSupported() {
return TeamCityProperties.getBoolean(Constants.RUN_AS_ACL_DEFAULTS_ENABLED);
}
示例5: isTrackerDedicatedPort
import jetbrains.buildServer.serverSide.TeamCityProperties; //导入方法依赖的package包/类
public boolean isTrackerDedicatedPort() {
return TeamCityProperties.getBoolean(TRACKER_DEDICATED_PORT);
}