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

temporalio / sdk-java / #433

20 Nov 2026 11:28PM UTC coverage: 71.886% (+0.05%) from 71.837%
#433

push

github

web-flow
Report storage driver types in worker heartbeats (#3230)

8791 of 14383 branches covered (61.12%)

Branch coverage included in aggregate %.

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

146 existing lines in 21 files now uncovered.

34692 of 46106 relevant lines covered (75.24%)

0.75 hits per line

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

47.17
/temporal-sdk/src/main/java/io/temporal/workflow/UpsertSearchAttributesOptions.java
1
package io.temporal.workflow;
2

3
import io.temporal.common.Experimental;
4
import io.temporal.common.SearchAttributeUpdate;
5
import java.util.*;
6

7
/**
8
 * Options for {@link Workflow#upsertTypedSearchAttributes(UpsertSearchAttributesOptions,
9
 * SearchAttributeUpdate[])}.
10
 */
11
public final class UpsertSearchAttributesOptions {
12

13
  public static UpsertSearchAttributesOptions.Builder newBuilder() {
14
    return new UpsertSearchAttributesOptions.Builder();
1 ✔
15
  }
16

17
  public static UpsertSearchAttributesOptions.Builder newBuilder(
18
      UpsertSearchAttributesOptions options) {
19
    return new UpsertSearchAttributesOptions.Builder(options);
×
20
  }
21

22
  public static UpsertSearchAttributesOptions getDefaultInstance() {
23
    return DEFAULT_INSTANCE;
1 ✔
24
  }
25

26
  private static final UpsertSearchAttributesOptions DEFAULT_INSTANCE;
27

28
  static {
29
    DEFAULT_INSTANCE = UpsertSearchAttributesOptions.newBuilder().build();
1 ✔
30
  }
1 ✔
31

32
  public static final class Builder {
33
    private List<EventGroup> eventGroups;
34

35
    private Builder() {}
36

37
    private Builder(UpsertSearchAttributesOptions options) {
×
38
      if (options == null) {
×
39
        return;
×
40
      }
41
      if (!options.eventGroups.isEmpty()) {
×
42
        this.eventGroups = new ArrayList<>(options.eventGroups);
×
43
      }
44
    }
×
45

46
    /**
47
     * Event Groups to associate with the search attributes update, in addition to those in scope.
48
     * Calls accumulate.
49
     *
50
     * @see EventGroup
51
     */
52
    @Experimental
53
    public Builder addEventGroups(EventGroup... eventGroups) {
54
      if (eventGroups.length == 0) return this;
1 !
55
      if (this.eventGroups == null) {
1 !
56
        this.eventGroups = new ArrayList<>(eventGroups.length);
1 ✔
57
      }
58
      for (EventGroup group : eventGroups) {
1 ✔
59
        this.eventGroups.add(Objects.requireNonNull(group, "eventGroups"));
1 ✔
60
      }
61
      return this;
1 ✔
62
    }
63

64
    /**
65
     * Associates the given Event Groups, in addition to any already added. Calls accumulate.
66
     *
67
     * @see EventGroup
68
     */
69
    @Experimental
70
    public Builder addEventGroups(List<EventGroup> eventGroups) {
UNCOV
71
      return addEventGroups(eventGroups.toArray(new EventGroup[0]));
×
72
    }
73

74
    public UpsertSearchAttributesOptions build() {
75
      return new UpsertSearchAttributesOptions(eventGroups);
1 ✔
76
    }
77
  }
78

79
  private final List<EventGroup> eventGroups;
80

81
  private UpsertSearchAttributesOptions(List<EventGroup> eventGroups) {
1 ✔
82
    this.eventGroups =
1 ✔
83
        eventGroups == null || eventGroups.isEmpty()
1 !
84
            ? Collections.emptyList()
1 ✔
85
            : Collections.unmodifiableList(new ArrayList<>(eventGroups));
1 ✔
86
  }
1 ✔
87

88
  @Experimental
89
  public List<EventGroup> getEventGroups() {
90
    return eventGroups;
1 ✔
91
  }
92

93
  public Builder toBuilder() {
UNCOV
94
    return new Builder(this);
×
95
  }
96

97
  @Override
98
  public String toString() {
UNCOV
99
    return "UpsertSearchAttributesOptions{" + "eventGroups=" + eventGroups + '}';
×
100
  }
101

102
  @Override
103
  public boolean equals(Object o) {
104
    if (this == o) return true;
×
105
    if (o == null || getClass() != o.getClass()) return false;
×
106
    UpsertSearchAttributesOptions that = (UpsertSearchAttributesOptions) o;
×
UNCOV
107
    return Objects.equals(eventGroups, that.eventGroups);
×
108
  }
109

110
  @Override
111
  public int hashCode() {
UNCOV
112
    return Objects.hashCode(eventGroups);
×
113
  }
114
}
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