Example usage for com.amazonaws.services.elasticbeanstalk.model EventDescription hashCode

List of usage examples for com.amazonaws.services.elasticbeanstalk.model EventDescription hashCode

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticbeanstalk.model EventDescription hashCode.

Prototype

@Override
    public int hashCode() 

Source Link

Usage

From source file:jetbrains.buildServer.runner.elasticbeanstalk.AWSClient.java

License:Apache License

private List<EventDescription> getNewEvents(@NotNull String environmentId, @NotNull Date startTime) {
    List<EventDescription> events = myElasticBeanstalkClient.describeEvents(new DescribeEventsRequest()
            .withEnvironmentId(environmentId).withStartTime(startTime).withMaxRecords(20)).getEvents();

    List<EventDescription> newEvents = new ArrayList<>();
    for (EventDescription event : events) {
        if (!pastEvents.containsKey(event.hashCode())) {
            newEvents.add(event);//  w  w  w  . j a v  a2 s .co m
            pastEvents.put(event.hashCode(), event);
        }
    }

    return newEvents;
}