protected AbstractStash(IActorContext context, int capacity = 100)
{
var actorCell = (ActorCell)context;
var mailbox = actorCell.Mailbox as IDequeBasedMailbox;
if(mailbox == null)
{
string message = @"DequeBasedMailbox required, got: " + actorCell.Mailbox.GetType().Name + @"
An (unbounded) deque-based mailbox can be configured as follows:
my-custom-mailbox {
mailbox-type = ""Akka.Dispatch.UnboundedDequeBasedMailbox""
}";
throw new NotSupportedException(message);
}
_theStash = new LinkedList<Envelope>();
_actorCell = actorCell;
// TODO: capacity needs to come from dispatcher or mailbox config
// https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Stash.scala#L126
_capacity = capacity;
}