public class LambdaRuntimeApiClientImpl extends Object implements LambdaRuntimeApiClient
| Constructor and Description |
|---|
LambdaRuntimeApiClientImpl(String hostnameAndPort) |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getSupplierResultWithExponentialBackoff(LambdaContextLogger lambdaLogger,
long initialDelayMS,
long maxBackoffPeriodMS,
int maxNumOfAttempts,
java.util.function.Supplier<T> supplier,
java.util.function.Function<Exception,String> exceptionMessageComposer,
Exception maxRetriesException) |
InvocationRequest |
nextInvocation()
Get next invocation
|
InvocationRequest |
nextInvocationWithExponentialBackoff(LambdaContextLogger lambdaLogger)
Get next invocation with exponential backoff
|
void |
reportInitError(LambdaError error)
Report Init error
|
void |
reportInvocationError(String requestId,
LambdaError error)
Report invocation error
|
void |
reportInvocationSuccess(String requestId,
byte[] response)
Report invocation success
|
void |
reportRestoreError(LambdaError error)
SnapStart endpoint to report errors during afterRestore hooks execution
|
void |
restoreNext()
SnapStart endpoint to report that beforeCheckoint hooks were executed
|
public LambdaRuntimeApiClientImpl(String hostnameAndPort)
public void reportInitError(LambdaError error) throws IOException
LambdaRuntimeApiClientreportInitError in interface LambdaRuntimeApiClienterror - error to reportIOExceptionpublic InvocationRequest nextInvocation()
LambdaRuntimeApiClientnextInvocation in interface LambdaRuntimeApiClientpublic static <T> T getSupplierResultWithExponentialBackoff(LambdaContextLogger lambdaLogger, long initialDelayMS, long maxBackoffPeriodMS, int maxNumOfAttempts, java.util.function.Supplier<T> supplier, java.util.function.Function<Exception,String> exceptionMessageComposer, Exception maxRetriesException) throws Exception
Exceptionpublic InvocationRequest nextInvocationWithExponentialBackoff(LambdaContextLogger lambdaLogger) throws Exception
LambdaRuntimeApiClientnextInvocationWithExponentialBackoff in interface LambdaRuntimeApiClientExceptionpublic void reportInvocationSuccess(String requestId, byte[] response)
LambdaRuntimeApiClientreportInvocationSuccess in interface LambdaRuntimeApiClientrequestId - request idresponse - byte array representing responsepublic void reportInvocationError(String requestId, LambdaError error) throws IOException
LambdaRuntimeApiClientreportInvocationError in interface LambdaRuntimeApiClientrequestId - request iderror - error to reportIOExceptionpublic void restoreNext()
throws IOException
LambdaRuntimeApiClientrestoreNext in interface LambdaRuntimeApiClientIOExceptionpublic void reportRestoreError(LambdaError error) throws IOException
LambdaRuntimeApiClientreportRestoreError in interface LambdaRuntimeApiClienterror - error to reportIOExceptionCopyright © 2025. All rights reserved.