Skip to content

Commit 2e69b64

Browse files
committed
rename parent context id to context id
1 parent 77e20b7 commit 2e69b64

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

sdk/src/main/java/software/amazon/lambda/durable/BaseContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public abstract class BaseContext {
1111
private final DurableConfig durableConfig;
1212
private final Context lambdaContext;
1313
private final ExecutionContext executionContext;
14-
private final String parentContextId;
14+
private final String contextId;
1515
private boolean isReplaying;
1616

1717
/** Shared initialization — sets all fields but performs no thread registration. */
@@ -20,7 +20,7 @@ protected BaseContext(
2020
this.executionManager = executionManager;
2121
this.durableConfig = durableConfig;
2222
this.lambdaContext = lambdaContext;
23-
this.parentContextId = contextId;
23+
this.contextId = contextId;
2424
this.executionContext = new ExecutionContext(executionManager.getDurableExecutionArn());
2525
this.isReplaying = executionManager.hasOperationsForContext(contextId);
2626
}
@@ -57,8 +57,8 @@ public DurableConfig getDurableConfig() {
5757
// ============= internal utilities ===============
5858

5959
/** Gets the context ID for this context. Null for root context, set for child contexts. */
60-
public String getParentContextId() {
61-
return parentContextId;
60+
public String getContextId() {
61+
return contextId;
6262
}
6363

6464
public ExecutionManager getExecutionManager() {

sdk/src/main/java/software/amazon/lambda/durable/DurableContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,6 @@ public DurableLogger getLogger() {
319319
*/
320320
private String nextOperationId() {
321321
var counter = String.valueOf(operationCounter.incrementAndGet());
322-
return getParentContextId() != null ? getParentContextId() + "-" + counter : counter;
322+
return getContextId() != null ? getContextId() + "-" + counter : counter;
323323
}
324324
}

sdk/src/main/java/software/amazon/lambda/durable/operation/BaseDurableOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ protected CompletableFuture<Void> sendOperationUpdateAsync(OperationUpdate.Build
252252
return executionManager.sendOperationUpdate(builder.id(operationId)
253253
.name(name)
254254
.type(operationType)
255-
.parentId(durableContext.getParentContextId())
255+
.parentId(durableContext.getContextId())
256256
.build());
257257
}
258258

0 commit comments

Comments
 (0)