All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.durabletask.OrchestratorFunction Maven / Gradle / Ivy

Go to download

This package contains classes and interfaces for building Durable Task orchestrations in Java.

There is a newer version: 1.5.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.durabletask;

/**
 * Functional interface for inline orchestrator functions.
 * 

* See the description of {@link TaskOrchestration} for more information about how to correctly implement orchestrators. */ @FunctionalInterface public interface OrchestratorFunction { /** * Executes an orchestrator function and returns a result to use as the orchestration output. *

* This functional interface is designed to support implementing orchestrators as lambda functions. It's intended to * be very similar to {@link java.util.function.Function}, but with a signature that's specific to orchestrators. * * @param ctx the orchestration context, which provides access to additional context for the current orchestration * execution * @return the serializable output of the orchestrator function * @throws OrchestratorBlockedEvent when the orchestrator blocks on an uncompleted task, which is a normal occurrence * @throws TaskFailedException when a task fails with an unhandled exception */ R apply(TaskOrchestrationContext ctx) throws OrchestratorBlockedEvent, TaskFailedException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy