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);
}
}