dev.restate.sdk.common.syscalls.HandlerRunner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-common Show documentation
Show all versions of sdk-common Show documentation
Common interfaces of the Restate SDK
The newest version!
// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH
//
// This file is part of the Restate Java SDK,
// which is released under the MIT license.
//
// You can find a copy of the license in file LICENSE in the root
// directory of this repository or package, or at
// https://github.com/restatedev/sdk-java/blob/main/LICENSE
package dev.restate.sdk.common.syscalls;
import java.nio.ByteBuffer;
import org.jspecify.annotations.Nullable;
public interface HandlerRunner {
/**
* Thread local to store {@link Syscalls}.
*
* Implementations of {@link HandlerRunner} should correctly propagate this thread local in
* order for logging to work correctly. Could be improved if ScopedContext will ever be introduced in
* log4j2.
*/
ThreadLocal SYSCALLS_THREAD_LOCAL = new ThreadLocal<>();
void run(
HandlerSpecification handlerSpecification,
Syscalls syscalls,
@Nullable O options,
SyscallCallback callback);
}