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

temporalio / sdk-java / #174

pending completion
#174

push

github-actions

web-flow
Add schedules API (#1776)

Add schedules API

1143 of 1143 new or added lines in 35 files covered. (100.0%)

18101 of 23284 relevant lines covered (77.74%)

0.78 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/ScheduleBackfill.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 io.temporal.api.enums.v1.ScheduleOverlapPolicy;
24
import java.time.Instant;
25
import java.util.Objects;
26

27
/** Time period and policy for actions taken as if their scheduled time has already passed. */
28
public final class ScheduleBackfill {
29
  private final Instant startAt;
30
  private final Instant endAt;
31
  private final ScheduleOverlapPolicy overlapPolicy;
32

33
  /**
34
   * Create a backfill request.
35
   *
36
   * @param startAt Start of the range to evaluate the schedule in. This is exclusive.
37
   * @param endAt End of the range to evaluate the schedule in. This is inclusive.
38
   */
39
  public ScheduleBackfill(Instant startAt, Instant endAt) {
40
    this(startAt, endAt, ScheduleOverlapPolicy.SCHEDULE_OVERLAP_POLICY_UNSPECIFIED);
×
41
  }
×
42

43
  /**
44
   * Create a backfill request.
45
   *
46
   * @param startAt Start of the range to evaluate the schedule in. This is exclusive.
47
   * @param endAt End of the range to evaluate the schedule in. This is inclusive.
48
   * @param overlapPolicy Overlap policy to use for this backfill request.
49
   */
50
  public ScheduleBackfill(Instant startAt, Instant endAt, ScheduleOverlapPolicy overlapPolicy) {
×
51
    this.startAt = startAt;
×
52
    this.endAt = endAt;
×
53
    this.overlapPolicy = overlapPolicy;
×
54
  }
×
55

56
  /**
57
   * Get the start of the range in this request. This is exclusive.
58
   *
59
   * @return start of range
60
   */
61
  public Instant getStartAt() {
62
    return startAt;
×
63
  }
64

65
  /**
66
   * End of the range to evaluate the schedule in this request. This is inclusive.
67
   *
68
   * @return end of range
69
   */
70
  public Instant getEndAt() {
71
    return endAt;
×
72
  }
73

74
  /**
75
   * Get the overlap policy for this request
76
   *
77
   * @return overlap policy
78
   */
79
  public ScheduleOverlapPolicy getOverlapPolicy() {
80
    return overlapPolicy;
×
81
  }
82

83
  @Override
84
  public boolean equals(Object o) {
85
    if (this == o) return true;
×
86
    if (o == null || getClass() != o.getClass()) return false;
×
87
    ScheduleBackfill that = (ScheduleBackfill) o;
×
88
    return Objects.equals(startAt, that.startAt)
×
89
        && Objects.equals(endAt, that.endAt)
×
90
        && overlapPolicy == that.overlapPolicy;
91
  }
92

93
  @Override
94
  public int hashCode() {
95
    return Objects.hash(startAt, endAt, overlapPolicy);
×
96
  }
97

98
  @Override
99
  public String toString() {
100
    return "ScheduleBackfill{"
×
101
        + "startAt="
102
        + startAt
103
        + ", endAt="
104
        + endAt
105
        + ", overlapPolicy="
106
        + overlapPolicy
107
        + '}';
108
  }
109
}
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