Package org.eigenbase.util.property

Examples of org.eigenbase.util.property.IntegerProperty


            }
            return tupleList;
        }

        private static void checkIfAggregationSizeIsTooLarge(List list) {
            final IntegerProperty property =
                MondrianProperties.instance().MaxConstraints;
            final int maxConstraints = property.get();
            if (list.size() > maxConstraints) {
                throw newEvalException(
                    null,
                    "Aggregation is not supported over a list"
                    + " with more than " + maxConstraints + " predicates"
                    + " (see property " + property.getPath() + ")");
            }
        }
View Full Code Here


            this.query = query;
        }

        protected Result run() {
            getConnection().getCacheControl(null).flushSchemaCache();
            IntegerProperty monLimit =
                MondrianProperties.instance().ResultLimit;
            int oldLimit = monLimit.get();
            try {
                monLimit.set(this.resultLimit);
                Result result = executeQuery(query, con);

                // Check the number of positions on the last axis, which is
                // the ROWS axis in a 2 axis query.
                int numAxes = result.getAxes().length;
                Axis a = result.getAxes()[numAxes - 1];
                final int positionCount = a.getPositions().size();
                assertEquals(rowCount, positionCount);
                return result;
            } finally {
                monLimit.set(oldLimit);
            }
        }
View Full Code Here

            }
            return parentLevelCount > 0;
        }

        private static void checkIfAggregationSizeIsTooLarge(List list) {
            final IntegerProperty property =
                MondrianProperties.instance().MaxConstraints;
            final int maxConstraints = property.get();
            if (list.size() > maxConstraints) {
                throw newEvalException(
                    null,
                    "Aggregation is not supported over a list"
                    + " with more than " + maxConstraints + " predicates"
                    + " (see property " + property.getPath() + ")");
            }
        }
View Full Code Here

    private final Timer timer =
        Util.newTimer("mondrian.rolap.RolapResultShepherd#timer", true);

    public RolapResultShepherd() {
        final IntegerProperty property =
            MondrianProperties.instance().RolapConnectionShepherdNbThreads;
        final int maximumPoolSize = property.get();
        executor =
            Util.getExecutorService(
                 // We use the same value for coreSize and maxSize
                // because that's the behavior we want. All extra
                // tasks will be put on an unbounded queue.
                maximumPoolSize,
                maximumPoolSize,
                1,
                "mondrian.rolap.RolapResultShepherd$executor",
                new RejectedExecutionHandler() {
                    public void rejectedExecution(
                        Runnable r,
                        ThreadPoolExecutor executor)
                    {
                        throw MondrianResource.instance().QueryLimitReached.ex(
                            maximumPoolSize,
                            property.getPath());
                    }
                });
        final Pair<Long, TimeUnit> interval =
            Util.parseInterval(
                String.valueOf(
View Full Code Here

TOP

Related Classes of org.eigenbase.util.property.IntegerProperty

Copyright © 2018 www.massapicom. 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.