Skip to content

Commit 47727be

Browse files
Rename NexusInfo to NexusOperationInfo
1 parent 58f94fa commit 47727be

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

temporal-sdk/src/main/java/io/temporal/common/interceptors/NexusOperationOutboundCallsInterceptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.uber.m3.tally.Scope;
44
import io.temporal.client.WorkflowClient;
55
import io.temporal.common.Experimental;
6-
import io.temporal.nexus.NexusInfo;
6+
import io.temporal.nexus.NexusOperationInfo;
77

88
/**
99
* Can be used to intercept calls from a Nexus operation into the Temporal APIs.
@@ -22,7 +22,7 @@
2222
@Experimental
2323
public interface NexusOperationOutboundCallsInterceptor {
2424
/** Intercepts call to get the Nexus info in a Nexus operation. */
25-
NexusInfo getInfo();
25+
NexusOperationInfo getInfo();
2626

2727
/** Intercepts call to get the metric scope in a Nexus operation. */
2828
Scope getMetricsScope();

temporal-sdk/src/main/java/io/temporal/common/interceptors/NexusOperationOutboundCallsInterceptorBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.uber.m3.tally.Scope;
44
import io.temporal.client.WorkflowClient;
55
import io.temporal.common.Experimental;
6-
import io.temporal.nexus.NexusInfo;
6+
import io.temporal.nexus.NexusOperationInfo;
77

88
/** Convenience base class for {@link NexusOperationOutboundCallsInterceptor} implementations. */
99
@Experimental
@@ -16,7 +16,7 @@ public NexusOperationOutboundCallsInterceptorBase(NexusOperationOutboundCallsInt
1616
}
1717

1818
@Override
19-
public NexusInfo getInfo() {
19+
public NexusOperationInfo getInfo() {
2020
return next.getInfo();
2121
}
2222

temporal-sdk/src/main/java/io/temporal/internal/nexus/InternalNexusOperationContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import io.temporal.api.common.v1.Link;
55
import io.temporal.client.WorkflowClient;
66
import io.temporal.common.interceptors.NexusOperationOutboundCallsInterceptor;
7-
import io.temporal.nexus.NexusInfo;
7+
import io.temporal.nexus.NexusOperationInfo;
88
import io.temporal.nexus.NexusOperationContext;
99

1010
public class InternalNexusOperationContext {
@@ -60,7 +60,7 @@ public Link getStartWorkflowResponseLink() {
6060

6161
private class NexusOperationContextImpl implements NexusOperationContext {
6262
@Override
63-
public NexusInfo getInfo() {
63+
public NexusOperationInfo getInfo() {
6464
return outboundCalls.getInfo();
6565
}
6666

temporal-sdk/src/main/java/io/temporal/internal/nexus/NexusInfoImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package io.temporal.internal.nexus;
22

3-
import io.temporal.nexus.NexusInfo;
3+
import io.temporal.nexus.NexusOperationInfo;
44

5-
class NexusInfoImpl implements NexusInfo {
5+
class NexusInfoImpl implements NexusOperationInfo {
66
private final String namespace;
77
private final String taskQueue;
88

temporal-sdk/src/main/java/io/temporal/internal/nexus/RootNexusOperationOutboundCallsInterceptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
import com.uber.m3.tally.Scope;
44
import io.temporal.client.WorkflowClient;
55
import io.temporal.common.interceptors.NexusOperationOutboundCallsInterceptor;
6-
import io.temporal.nexus.NexusInfo;
6+
import io.temporal.nexus.NexusOperationInfo;
77

88
public class RootNexusOperationOutboundCallsInterceptor
99
implements NexusOperationOutboundCallsInterceptor {
1010
private final Scope scope;
1111
private final WorkflowClient client;
12-
private final NexusInfo nexusInfo;
12+
private final NexusOperationInfo nexusInfo;
1313

1414
RootNexusOperationOutboundCallsInterceptor(
15-
Scope scope, WorkflowClient client, NexusInfo nexusInfo) {
15+
Scope scope, WorkflowClient client, NexusOperationInfo nexusInfo) {
1616
this.scope = scope;
1717
this.client = client;
1818
this.nexusInfo = nexusInfo;
1919
}
2020

2121
@Override
22-
public NexusInfo getInfo() {
22+
public NexusOperationInfo getInfo() {
2323
return nexusInfo;
2424
}
2525

temporal-sdk/src/main/java/io/temporal/nexus/NexusOperationContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
public interface NexusOperationContext {
1212

1313
/** Get Temporal information about the Nexus Operation. */
14-
NexusInfo getInfo();
14+
NexusOperationInfo getInfo();
1515

1616
/**
1717
* Get scope for reporting business metrics in a nexus handler. This scope is tagged with the

temporal-sdk/src/main/java/io/temporal/nexus/NexusInfo.java renamed to temporal-sdk/src/main/java/io/temporal/nexus/NexusOperationInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Temporal information about the Nexus Operation. Use {@link NexusOperationContext#getInfo()} from
55
* a Nexus Operation implementation to access.
66
*/
7-
public interface NexusInfo {
7+
public interface NexusOperationInfo {
88
/**
99
* @return Namespace of the worker that is executing the Nexus Operation
1010
*/

temporal-sdk/src/test/java/io/temporal/workflow/nexus/NexusOperationInfoTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import io.nexusrpc.handler.OperationImpl;
55
import io.nexusrpc.handler.ServiceImpl;
66
import io.temporal.nexus.Nexus;
7-
import io.temporal.nexus.NexusInfo;
7+
import io.temporal.nexus.NexusOperationInfo;
88
import io.temporal.testing.internal.SDKTestWorkflowRule;
99
import io.temporal.workflow.*;
1010
import io.temporal.workflow.shared.TestNexusServices;
@@ -46,7 +46,7 @@ public static class TestNexusServiceImpl {
4646
public OperationHandler<String, String> operation() {
4747
return OperationHandler.sync(
4848
(context, details, input) -> {
49-
NexusInfo info = Nexus.getOperationContext().getInfo();
49+
NexusOperationInfo info = Nexus.getOperationContext().getInfo();
5050
return info.getNamespace() + ":" + info.getTaskQueue();
5151
});
5252
}

0 commit comments

Comments
 (0)