io.dapr.actors.runtime.ActorFactory Maven / Gradle / Ivy
/*
* Copyright (c) Microsoft Corporation and Dapr Contributors.
* Licensed under the MIT License.
*/
package io.dapr.actors.runtime;
import io.dapr.actors.ActorId;
/**
* Creates an actor of a given type.
*
* @param Actor Type to be created.
*/
@FunctionalInterface
public interface ActorFactory {
/**
* Creates an Actor.
*
* @param actorRuntimeContext Actor type's context in the runtime.
* @param actorId Actor Id.
* @return Actor or null it failed.
*/
T createActor(ActorRuntimeContext actorRuntimeContext, ActorId actorId);
}