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

io.dapr.actors.runtime.ActorFactory Maven / Gradle / Ivy

There is a newer version: 1.13.0-rc-1
Show newest version
/*
 * 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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy