本文整理汇总了Java中jetbrains.buildServer.clouds.CloudInstance类的典型用法代码示例。如果您正苦于以下问题:Java CloudInstance类的具体用法?Java CloudInstance怎么用?Java CloudInstance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CloudInstance类属于jetbrains.buildServer.clouds包,在下文中一共展示了CloudInstance类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doHandle
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@Nullable
@Override
protected ModelAndView doHandle(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse) throws Exception {
String projectId = httpServletRequest.getParameter("projectId");
String profileId = httpServletRequest.getParameter("profileId");
String imageId = httpServletRequest.getParameter("imageId");
if(StringUtil.isEmpty(imageId)) return null;
final CloudClientEx client = myCloudManager.getClientIfExistsByProjectExtId(projectId, profileId);
CloudImage image = client.findImageById(imageId);
if(isGet(httpServletRequest)){
ModelAndView modelAndView = new ModelAndView(myPluginDescriptor.getPluginResourcesPath("deleteImageDialog.jsp"));
modelAndView.getModelMap().put("instances", image == null ? Collections.emptyList() : image.getInstances());
return modelAndView;
} else if(isPost(httpServletRequest) && image != null){
for (CloudInstance instance : image.getInstances()){
client.terminateInstance(instance);
}
}
return null;
}
示例2: getInstances
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@NotNull
@Override
public Collection<? extends CloudInstance> getInstances() {
return myIdToInstanceMap.values();
}
示例3: findInstanceById
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@Nullable
@Override
public CloudInstance findInstanceById(@NotNull String id) {
return myIdToInstanceMap.get(id);
}
示例4: findInstanceById
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
public CloudInstance findInstanceById(@NotNull String id) {
return instances.get(id);
}
示例5: getInstances
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@NotNull
public Collection<? extends CloudInstance> getInstances() {
return Collections.unmodifiableCollection(instances.values());
}
示例6: getInstances
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@NotNull
public Collection<? extends CloudInstance> getInstances() {
return instancesMap.values();
}
示例7: findInstanceById
import jetbrains.buildServer.clouds.CloudInstance; //导入依赖的package包/类
@Nullable
public CloudInstance findInstanceById(String s) {
return instancesMap.get(s);
}