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

com.fireflysource.common.actor.MailboxFactory Maven / Gradle / Ivy

The newest version!
package com.fireflysource.common.actor;

import org.jctools.queues.MpscLinkedQueue;
import org.jctools.queues.SpscLinkedQueue;

import java.util.Queue;

abstract public class MailboxFactory {

    public static  Mailbox createMailbox() {
        return new AbstractActor.MailboxImpl<>(new MpscLinkedQueue<>(), new SpscLinkedQueue<>());
    }

    public static  Mailbox createMailbox(Queue userMessageQueue, Queue systemMessageQueue) {
        return new AbstractActor.MailboxImpl<>(userMessageQueue, systemMessageQueue);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy