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

temporalio / sdk-java / #427

16 Nov 2026 04:17PM UTC coverage: 71.787% (+0.1%) from 71.675%
#427

push

github

web-flow
Provide the namespace to storage drivers (#3203)

8613 of 14069 branches covered (61.22%)

Branch coverage included in aggregate %.

13 of 22 new or added lines in 12 files covered. (59.09%)

140 existing lines in 13 files now uncovered.

34118 of 45456 relevant lines covered (75.06%)

0.75 hits per line

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

83.33
/temporal-sdk/src/main/java/io/temporal/internal/worker/ActivityTask.java
1
package io.temporal.internal.worker;
2

3
import io.temporal.api.workflowservice.v1.PollActivityTaskQueueResponseOrBuilder;
4
import io.temporal.internal.activity.LocalActivityArguments;
5
import io.temporal.worker.tuning.SlotPermit;
6
import io.temporal.workflow.Functions;
7
import javax.annotation.Nonnull;
8
import javax.annotation.Nullable;
9

10
public final class ActivityTask implements ScalingTask {
11
  private final @Nonnull PollActivityTaskQueueResponseOrBuilder response;
12
  private final @Nonnull SlotPermit permit;
13
  private final @Nonnull Functions.Proc completionCallback;
14
  private final @Nullable LocalActivityArguments localActivityArguments;
15

16
  public ActivityTask(
17
      @Nonnull PollActivityTaskQueueResponseOrBuilder response,
18
      @Nonnull SlotPermit permit,
19
      @Nonnull Functions.Proc completionCallback) {
20
    this(response, permit, completionCallback, null);
1 ✔
21
  }
1 ✔
22

23
  public ActivityTask(
24
      @Nonnull PollActivityTaskQueueResponseOrBuilder response,
25
      @Nonnull SlotPermit permit,
26
      @Nonnull Functions.Proc completionCallback,
27
      @Nullable LocalActivityArguments localActivityArguments) {
1 ✔
28
    this.response = response;
1 ✔
29
    this.permit = permit;
1 ✔
30
    this.completionCallback = completionCallback;
1 ✔
31
    this.localActivityArguments = localActivityArguments;
1 ✔
32
  }
1 ✔
33

34
  @Nonnull
35
  public PollActivityTaskQueueResponseOrBuilder getResponse() {
36
    return response;
1 ✔
37
  }
38

39
  @Nullable
40
  public LocalActivityArguments getLocalActivityArguments() {
41
    return localActivityArguments;
1 ✔
42
  }
43

44
  /**
45
   * Completion handle function that must be called by the handler whenever activity processing is
46
   * completed.
47
   */
48
  @Nonnull
49
  public Functions.Proc getCompletionCallback() {
50
    return completionCallback;
1 ✔
51
  }
52

53
  @Nonnull
54
  public SlotPermit getPermit() {
55
    return permit;
1 ✔
56
  }
57

58
  @Nullable
59
  @Override
60
  public ScalingDecision getScalingDecision() {
61
    if (!response.hasPollerScalingDecision()) {
1 !
62
      return null;
1 ✔
63
    }
64

UNCOV
65
    return new ScalingTask.ScalingDecision(
×
UNCOV
66
        response.getPollerScalingDecision().getPollRequestDeltaSuggestion());
×
67
  }
68
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc