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


Java EventDescription类代码示例

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


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

示例1: AWSEBEnvironmentUpdaterThread

import com.amazonaws.services.elasticbeanstalk.model.EventDescription; //导入依赖的package包/类
public AWSEBEnvironmentUpdaterThread(AWSElasticBeanstalk awseb, EnvironmentDescription envd, BuildListener listener, String versionLabel) {
    this.awseb = awseb;
    this.envd = envd;
    this.listener = listener;
    this.versionLabel = versionLabel;
    this.lastEvent = new EventDescription();
    lastEvent.setEventDate(new Date());
    
    // We can make our requests and, hopefully, safely assume the environmentId won't change under us.
    envRequest = new DescribeEnvironmentsRequest().withEnvironmentIds(envd.getEnvironmentId());
    eventRequest = new DescribeEventsRequest().withEnvironmentId(envd.getEnvironmentId());
    
    // Hack to acknowledge that the time of the Jenkins box may not match AWS.
    try {
        DescribeEventsResult lastEntry = awseb.describeEvents(new DescribeEventsRequest()
                                                                    .withEnvironmentId(envd.getEnvironmentId())
                                                                    .withMaxRecords(1));
        lastEvent = lastEntry.getEvents().get(0);
    } catch (Exception e) {
        log("'%s': Unable to get last event, using system current timestamp for event logs", envd.getEnvironmentName());
    }
    eventRequest.withStartTime(lastEvent.getEventDate()); // Initialize to the right start time.
    
    this.environmentId = envd.getEnvironmentId();
    nAttempt = 0;

}
 
开发者ID:DavidTanner,项目名称:aws-beanstalk-publisher,代码行数:28,代码来源:AWSEBEnvironmentUpdaterThread.java

示例2: compareEventDescriptions

import com.amazonaws.services.elasticbeanstalk.model.EventDescription; //导入依赖的package包/类
private boolean compareEventDescriptions(EventDescription first, EventDescription second) {
    boolean isEqual = first.getApplicationName().equals(second.getApplicationName());
    isEqual &= first.getEnvironmentName().equals(second.getEnvironmentName());
    isEqual &= first.getMessage().equals(second.getMessage());
    isEqual &= first.getSeverity().equals(second.getSeverity());
    isEqual &= first.getEventDate().getTime() == second.getEventDate().getTime();
    return isEqual;
}
 
开发者ID:DavidTanner,项目名称:aws-beanstalk-publisher,代码行数:9,代码来源:AWSEBEnvironmentUpdaterThread.java


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