class RoundRobinOperationQueue {

    public synchronized boolean offer(String key, Operation op) {
        if (key == null || op == null) {
            throw new IllegalArgumentException(format("key and operation are required (%s)", this.description));
        }

        if (this.totalCount >= this.limit) {
            op.setStatusCode(Operation.STATUS_CODE_UNAVAILABLE);
            op.fail(new CancellationException(format("Limit for queue %s exceeded: %d", this.description, this.limit)));
            return false;
        }

        Queue<Operation> q = this.queues.computeIfAbsent(key, this::makeQueue);
        q.offer(op);
        this.totalCount++;

        return true;
    }

    public  RoundRobinOperationQueue(String description, int limit);

}