Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Caching of actor refs? Am I asking for trouble?

$
0
0

@MakkaPakka wrote:

I’m using a Google Guava LoadingCache to provide child actors. Is that a bad idea? Will some kind of nasty threading issue bite me in the backside if I continue with this strategy?

Here’s the load method from my CacheLoader implementation:

    @Override
    public ActorRef<Foundation.Command> load(AccountId accountId) {
         ActorRef<Foundation.Command> actor = context.spawnAnonymous(
                Foundation.create(host, accountId, permissionFinder));
        context.watchWith(actor, RemoveFoundationActor.INSTANCE);
        return actor;
    }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles