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

temporalio / sdk-java / #284

23 Jul 2024 10:09PM UTC coverage: 77.304% (-0.06%) from 77.364%
#284

push

github

web-flow
Reintroduce slot supplier & add many tests (#2143)

593 of 752 new or added lines in 37 files covered. (78.86%)

22 existing lines in 10 files now uncovered.

19554 of 25295 relevant lines covered (77.3%)

0.77 hits per line

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

31.25
/temporal-sdk/src/main/java/io/temporal/worker/tuning/ActivitySlotInfo.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.worker.tuning;
22

23
import io.temporal.activity.ActivityInfo;
24
import io.temporal.common.Experimental;
25
import java.util.Objects;
26

27
/** Contains information about a slot that is being used to execute an activity task. */
28
@Experimental
29
public class ActivitySlotInfo extends SlotInfo {
30
  private final ActivityInfo activityInfo;
31
  private final String workerIdentity;
32
  private final String workerBuildId;
33

34
  public ActivitySlotInfo(ActivityInfo activityInfo, String workerIdentity, String workerBuildId) {
1✔
35
    this.activityInfo = activityInfo;
1✔
36
    this.workerIdentity = workerIdentity;
1✔
37
    this.workerBuildId = workerBuildId;
1✔
38
  }
1✔
39

40
  public ActivityInfo getActivityInfo() {
NEW
41
    return activityInfo;
×
42
  }
43

44
  public String getWorkerIdentity() {
NEW
45
    return workerIdentity;
×
46
  }
47

48
  public String getWorkerBuildId() {
NEW
49
    return workerBuildId;
×
50
  }
51

52
  @Override
53
  public boolean equals(Object o) {
NEW
54
    if (this == o) return true;
×
NEW
55
    if (o == null || getClass() != o.getClass()) return false;
×
NEW
56
    ActivitySlotInfo that = (ActivitySlotInfo) o;
×
NEW
57
    return Objects.equals(activityInfo, that.activityInfo)
×
NEW
58
        && Objects.equals(workerIdentity, that.workerIdentity)
×
NEW
59
        && Objects.equals(workerBuildId, that.workerBuildId);
×
60
  }
61

62
  @Override
63
  public int hashCode() {
NEW
64
    return Objects.hash(activityInfo, workerIdentity, workerBuildId);
×
65
  }
66

67
  @Override
68
  public String toString() {
NEW
69
    return "ActivitySlotInfo{"
×
70
        + "activityInfo="
71
        + activityInfo
72
        + ", workerIdentity='"
73
        + workerIdentity
74
        + '\''
75
        + ", workerBuildId='"
76
        + workerBuildId
77
        + '\''
78
        + '}';
79
  }
80
}
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

© 2026 Coveralls, Inc