AkkaUtils

io.github.positionpal.location.tracking.utils.AkkaUtils
object AkkaUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AkkaUtils.type

Members list

Value members

Concrete methods

def refOf[T](entityTypeKey: EntityTypeKey[T], entityId: String)(using actorSystem: ActorSystem[_]): EntityRef[T]

Retrieves the EntityRef of an Akka Cluster Sharding entity.

Retrieves the EntityRef of an Akka Cluster Sharding entity.

Type parameters

T

the type of the entity key.

Value parameters

actorSystem

The actor system.

entityId

The unique identifier of the entity.

entityTypeKey

The type key of the entity.

Attributes

Returns

The entity reference of the sharded entity in the cluster.

def startup[F[_] : Async, T](config: Config, actorSystemName: String, timeoutAwaitCatsEffect: Duration, timeoutAwaitAkkaTermination: Duration)(behavior: => Behavior[T]): Resource[F, ActorSystem[T]]

Starts up a typed Akka Actor System in the context of a Cats-Effect Resource, integrating the two runtimes with their cancellation abilities.

Starts up a typed Akka Actor System in the context of a Cats-Effect Resource, integrating the two runtimes with their cancellation abilities.

Type parameters

F

The Async effect type.

T

The type of the actor system.

Value parameters

actorSystemName

The name of the actor system. By default, it is ClusterSystem.

behavior

The behavior of the actor system.

config

The HOCON actor system configuration.

timeoutAwaitAkkaTermination

The maximum amount of time to wait for the actor system to terminate, after terminate() was called.

timeoutAwaitCatsEffect

The maximum amount of time Akka's coordinated-shutdown is allowed to wait for Cats-Effect to finish.

Attributes

Returns

A Cats-Effect Resource that starts up the actor system and takes care of its termination.

See also