• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #189

26 Sep 2023 02:27PM CUT coverage: 77.349% (-0.02%) from 77.369%
#189

push

github-actions

web-flow
Fix workflow options equality (#1868)

1 of 1 new or added line in 1 file covered. (100.0%)

18665 of 24131 relevant lines covered (77.35%)

0.77 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/temporal-sdk/src/main/java/io/temporal/client/schedules/ScheduleActionResult.java
1
/*
2
 * Copyright (C) 2022 Temporal Technologies, Inc. All Rights Reserved.
3
 *
4
 * Copyright (C) 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
 *
6
 * Modifications copyright (C) 2017 Uber Technologies, Inc.
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this material except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 *   http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20

21
package io.temporal.client.schedules;
22

23
import java.time.Instant;
24
import java.util.Objects;
25

26
/** Information about when an action took place. */
27
public final class ScheduleActionResult {
28
  private final Instant scheduledAt;
29
  private final Instant startedAt;
30
  private final ScheduleActionExecution action;
31

32
  public ScheduleActionResult(
33
      Instant scheduledAt, Instant startedAt, ScheduleActionExecution action) {
×
34
    this.scheduledAt = scheduledAt;
×
35
    this.startedAt = startedAt;
×
36
    this.action = action;
×
37
  }
×
38

39
  /**
40
   * Get the scheduled time of the action including jitter.
41
   *
42
   * @return scheduled time of action
43
   */
44
  public Instant getScheduledAt() {
45
    return scheduledAt;
×
46
  }
47

48
  /**
49
   * Get when the action actually started.
50
   *
51
   * @return time action actually started
52
   */
53
  public Instant getStartedAt() {
54
    return startedAt;
×
55
  }
56

57
  /**
58
   * Action that took place.
59
   *
60
   * @return action started
61
   */
62
  public ScheduleActionExecution getAction() {
63
    return action;
×
64
  }
65

66
  @Override
67
  public boolean equals(Object o) {
68
    if (this == o) return true;
×
69
    if (o == null || getClass() != o.getClass()) return false;
×
70
    ScheduleActionResult that = (ScheduleActionResult) o;
×
71
    return Objects.equals(scheduledAt, that.scheduledAt)
×
72
        && Objects.equals(startedAt, that.startedAt)
×
73
        && Objects.equals(action, that.action);
×
74
  }
75

76
  @Override
77
  public int hashCode() {
78
    return Objects.hash(scheduledAt, startedAt, action);
×
79
  }
80

81
  @Override
82
  public String toString() {
83
    return "ScheduleActionResult{"
×
84
        + "scheduledAt="
85
        + scheduledAt
86
        + ", startedAt="
87
        + startedAt
88
        + ", action="
89
        + action
90
        + '}';
91
  }
92
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc