Search in sources :

Example 1 with QueueCapacityExceededException

use of co.paralleluniverse.strands.queues.QueueCapacityExceededException in project quasar by puniverse.

the class FakeActor method internalSendNonSuspendable.

@Override
protected void internalSendNonSuspendable(Object message) {
    record(1, "ActorRef", "internalSendNonSuspendable", "Sending %s -> %s", message, this);
    Message msg = filterMessage(message);
    if (msg == null)
        return;
    if (!mailbox().trySend(msg))
        throw new QueueCapacityExceededException();
}
Also used : QueueCapacityExceededException(co.paralleluniverse.strands.queues.QueueCapacityExceededException)

Example 2 with QueueCapacityExceededException

use of co.paralleluniverse.strands.queues.QueueCapacityExceededException in project quasar by puniverse.

the class QueueChannel method sendNonSuspendable.

public void sendNonSuspendable(Message message) throws QueueCapacityExceededException {
    if (isSendClosed()) {
        record("sendNonSuspendable", "%s channel is closed for send. Dropping message %s", this, message);
        return;
    }
    record("sendNonSuspendable", "%s enqueing message %s", this, message);
    if (!queue.enq(message))
        throw new QueueCapacityExceededException();
    signalReceivers();
}
Also used : QueueCapacityExceededException(co.paralleluniverse.strands.queues.QueueCapacityExceededException)

Aggregations

QueueCapacityExceededException (co.paralleluniverse.strands.queues.QueueCapacityExceededException)2