Examples of QueueCapacityExceededException


Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

        record(1, "ActorRef", "internalSendNonSuspendable", "Sending %s -> %s", message, this);
        Message msg = filterMessage(message);
        if (msg == null)
            return;
        if (!mailbox().trySend(msg))
            throw new QueueCapacityExceededException();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

        record(1, "ActorRef", "internalSendNonSuspendable", "Sending %s -> %s", message, this);
        Message msg = filterMessage(message);
        if (msg == null)
            return;
        if (!mailbox().trySend(msg))
            throw new QueueCapacityExceededException();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

    void onQueueFull(int iter, boolean timed, long nanos) throws SuspendExecution, InterruptedException, TimeoutException {
        switch (overflowPolicy) {
            case DROP:
                return;
            case THROW:
                throw new QueueCapacityExceededException();
            case BLOCK:
                if (timed)
                    sendersSync.await(iter, nanos, TimeUnit.NANOSECONDS);
                else
                    sendersSync.await(iter);
                break;
            case BACKOFF:
                if (iter > MAX_SEND_RETRIES)
                    throw new QueueCapacityExceededException();
                if (iter > 5)
                    Strand.sleep((iter - 5) * 5);
                else if (iter > 4)
                    Strand.yield();
        }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

            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();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

        record(1, "ActorRef", "internalSendNonSuspendable", "Sending %s -> %s", message, this);
        Message msg = filterMessage(message);
        if (msg == null)
            return;
        if (!mailbox().trySend(msg))
            throw new QueueCapacityExceededException();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

    void onQueueFull(int iter, boolean timed, long nanos) throws SuspendExecution, InterruptedException, TimeoutException {
        switch (overflowPolicy) {
            case DROP:
                return;
            case THROW:
                throw new QueueCapacityExceededException();
            case BLOCK:
                if (timed)
                    sendersSync.await(iter, nanos, TimeUnit.NANOSECONDS);
                else
                    sendersSync.await(iter);
                break;
            case BACKOFF:
                if (iter > MAX_SEND_RETRIES)
                    throw new QueueCapacityExceededException();
                if (iter > 5)
                    Strand.sleep((iter - 5) * 5);
                else if (iter > 4)
                    Strand.yield();
        }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

            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();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

    public void sendNonSuspendable(Message message) throws QueueCapacityExceededException {
        if (isSendClosed())
            return;
        if (!queue.enq(message))
            throw new QueueCapacityExceededException();
        signalReceivers();
    }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

    void onQueueFull(int iter, boolean timed, long nanos) throws SuspendExecution, InterruptedException, TimeoutException {
        switch (overflowPolicy) {
            case DROP:
                return;
            case THROW:
                throw new QueueCapacityExceededException();
            case BLOCK:
                if (timed) {
                    if (nanos > 0) {
                        if (sendersSync.await(iter, nanos, TimeUnit.NANOSECONDS))
                            return;
                    }
                    throw new TimeoutException();
                } else
                    sendersSync.await(iter);
                break;
            case BACKOFF:
                if (iter > MAX_SEND_RETRIES)
                    throw new QueueCapacityExceededException();
                if (iter > 5)
                    Strand.sleep((iter - 5) * 5);
                else if (iter > 4)
                    Strand.yield();
        }
View Full Code Here

Examples of co.paralleluniverse.strands.queues.QueueCapacityExceededException

    public void sendNonSuspendable(Message message) throws QueueCapacityExceededException {
        if (isSendClosed())
            return;
        if (!queue.enq(message))
            throw new QueueCapacityExceededException();
        signalReceivers();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.