ClusterActorRegistry

A specialized actor registry that integrates with cluster-based implementations for managing distributed actors.

This class extends the functionality of a base actor registry by adding support for cluster-specific features such as actor lookups, registration, and references within a distributed system. It uses a cluster implementation to communicate and interact with actors that may not reside in the local process but are part of the distributed cluster.

Parameters

loggerFactory

The factory used for creating loggers to facilitate structured logging for the registry.

Constructors

Link copied to clipboard
constructor(loggerFactory: Logger.Factory)

Creates a new instance of the cluster actor registry associated with a specified logger factory.

Properties

Link copied to clipboard
val log: Logger

Functions

Link copied to clipboard
open override fun factoryFor(actor: AnyActorClass, factory: ActorFactory): ClusterActorRegistry

Registers the actor class with the provided factory and returns the updated actor registry.

Link copied to clipboard
open suspend override fun get(clazz: AnyActorClass, address: Address): ActorRef

Retrieves an actor reference for the specified actor class and address.

suspend fun get(clazz: AnyActorClass, key: String): ActorRef
Link copied to clipboard

Registers the given cluster implementation with the actor registry.

Link copied to clipboard
suspend fun shutdown()
Link copied to clipboard
suspend fun size(): Int
Link copied to clipboard
suspend fun totalMessages(): Long