001/*
002// This software is subject to the terms of the Eclipse Public License v1.0
003// Agreement, available at the following URL:
004// http://www.eclipse.org/legal/epl-v10.html.
005// You must accept the terms of that agreement to use this software.
006//
007// Copyright (C) 2011-2011 Pentaho and others
008// All Rights Reserved.
009*/
010package mondrian.rolap.agg;
011
012/**
013 * Signals that there are enough outstanding cell requests that it is
014 * worth terminating this phase of execution and asking the segment cache
015 * for all of the cells that have been asked for.
016 *
017 * <p>Not really an exception, just a way of aborting a process so that we can
018 * do some work and restart the process. Any code that handles this exception
019 * is typically in a loop that calls {@link mondrian.rolap.RolapResult#phase}.
020 * </p>
021 *
022 * <p>There are several advantages to this:</p>
023 * <ul>
024 *     <li>If the query has been run before, the cells will be in the
025 *     cache already, and this is an opportunity to copy them into the
026 *     local cache.</li>
027 *     <li>If cell requests are for the same or similar cells, it gives
028 *     opportunity to fetch these cells. Then the requests can be answered
029 *     from local cache, and we don't need to bother the cache manager with
030 *     similar requests.</li>
031 *     <li>Prevents memory from filling up with cell requests.</li>
032 * </ul>
033 */
034public final class CellRequestQuantumExceededException
035    extends RuntimeException
036{
037    public static final CellRequestQuantumExceededException INSTANCE =
038        new CellRequestQuantumExceededException();
039
040    private CellRequestQuantumExceededException() {
041    }
042}
043
044// End CellRequestQuantumExceededException.java