-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathBaseContext.java
More file actions
52 lines (43 loc) · 1.39 KB
/
BaseContext.java
File metadata and controls
52 lines (43 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.amazon.lambda.durable.context;
import com.amazonaws.services.lambda.runtime.Context;
import software.amazon.lambda.durable.DurableConfig;
import software.amazon.lambda.durable.logging.DurableLogger;
public interface BaseContext extends AutoCloseable {
/**
* Gets a logger with additional information of the current execution context.
*
* @return a DurableLogger instance
*/
DurableLogger getLogger();
/**
* Returns the AWS Lambda runtime context.
*
* @return the Lambda context
*/
Context getLambdaContext();
/**
* Returns the current durable execution arn
*
* @return the execution arn
*/
String getExecutionArn();
/**
* Returns the configuration for durable execution behavior.
*
* @return the durable configuration
*/
DurableConfig getDurableConfig();
/**
* Gets the context ID for this context. Null for root context, operationId of the context operation for child
* contexts.
*/
String getContextId();
/** Gets the context name for this context. Null for root context. */
String getContextName();
/** Returns whether this context is currently in replay mode. */
boolean isReplaying();
/** Closes this context. */
void close();
}