Package co.paralleluniverse.actors
Class MailboxConfig
- java.lang.Object
-
- co.paralleluniverse.actors.MailboxConfig
-
- All Implemented Interfaces:
java.io.Serializable
public class MailboxConfig extends java.lang.Object implements java.io.SerializableAn actor mailbox configuration.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MailboxConfig()Specifies a default mailbox configuration - an unbounded mailbox.MailboxConfig(int mailboxSize, Channels.OverflowPolicy policy)Specifies a mailbox configuration with a given size and overflow policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMailboxSize()Channels.OverflowPolicygetPolicy()java.lang.StringtoString()
-
-
-
Constructor Detail
-
MailboxConfig
public MailboxConfig(int mailboxSize, Channels.OverflowPolicy policy)Specifies a mailbox configuration with a given size and overflow policy.Note: The overflow policy is currently ignored. An mailbox overflow will result in an exception being thrown inside the actor by
receive()regardless of policy.- Parameters:
mailboxSize- The number of messages that can wait in the mailbox channel, with-1specifying an unbounded mailbox.policy- Specifies what to do when the mailbox is full and a new message is added.
-
MailboxConfig
public MailboxConfig()
Specifies a default mailbox configuration - an unbounded mailbox.
-
-
Method Detail
-
getMailboxSize
public int getMailboxSize()
-
getPolicy
public Channels.OverflowPolicy getPolicy()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-