001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.processor.aggregate;
018
019/**
020 * Various statistics of the aggregator
021 */
022public interface AggregateProcessorStatistics {
023
024    /**
025     * Total number of exchanges arrived into the aggregator
026     */
027    long getTotalIn();
028
029    /**
030     * Total number of exchanges completed and outgoing from the aggregator
031     */
032    long getTotalCompleted();
033
034    /**
035     * Total number of exchanged completed by completion size trigger
036     */
037    long getCompletedBySize();
038
039    /**
040     * Total number of exchanged completed by completion strategy trigger
041     */
042    long getCompletedByStrategy();
043
044    /**
045     * Total number of exchanged completed by completion interval trigger
046     */
047    long getCompletedByInterval();
048
049    /**
050     * Total number of exchanged completed by completion timeout trigger
051     */
052    long getCompletedByTimeout();
053
054    /**
055     * Total number of exchanged completed by completion predicate trigger
056     */
057    long getCompletedByPredicate();
058
059    /**
060     * Total number of exchanged completed by completion batch consumer trigger
061     */
062    long getCompletedByBatchConsumer();
063
064    /**
065     * Total number of exchanged completed by completion force trigger
066     */
067    long getCompletedByForce();
068
069    /**
070     * Reset the counters
071     */
072    void reset();
073
074    /**
075     * Whether statistics is enabled.
076     */
077    boolean isStatisticsEnabled();
078
079    /**
080     * Sets whether statistics is enabled.
081     *
082     * @param statisticsEnabled <tt>true</tt> to enable
083     */
084    void setStatisticsEnabled(boolean statisticsEnabled);
085
086}