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.api.management.mbean;
018
019import java.util.Date;
020
021import org.apache.camel.api.management.ManagedAttribute;
022import org.apache.camel.api.management.ManagedOperation;
023
024public interface ManagedPerformanceCounterMBean extends ManagedCounterMBean {
025
026    @ManagedAttribute(description = "Number of completed exchanges")
027    long getExchangesCompleted();
028
029    @ManagedAttribute(description = "Number of failed exchanges")
030    long getExchangesFailed();
031
032    @ManagedAttribute(description = "Number of inflight exchanges")
033    long getExchangesInflight();
034
035    @ManagedAttribute(description = "Number of failures handled")
036    long getFailuresHandled();
037
038    @ManagedAttribute(description = "Number of redeliveries (internal only)")
039    long getRedeliveries();
040
041    @ManagedAttribute(description = "Number of external initiated redeliveries (such as from JMS broker)")
042    long getExternalRedeliveries();
043
044    @ManagedAttribute(description = "Min Processing Time [milliseconds]")
045    long getMinProcessingTime();
046
047    @ManagedAttribute(description = "Mean Processing Time [milliseconds]")
048    long getMeanProcessingTime();
049
050    @ManagedAttribute(description = "Max Processing Time [milliseconds]")
051    long getMaxProcessingTime();
052
053    @ManagedAttribute(description = "Total Processing Time [milliseconds]")
054    long getTotalProcessingTime();
055
056    @ManagedAttribute(description = "Last Processing Time [milliseconds]")
057    long getLastProcessingTime();
058
059    @ManagedAttribute(description = "Delta Processing Time [milliseconds]")
060    long getDeltaProcessingTime();
061
062    @ManagedAttribute(description = "Last Exchange Created Timestamp")
063    Date getLastExchangeCreatedTimestamp();
064
065    @ManagedAttribute(description = "Last Exchange Completed Timestamp")
066    Date getLastExchangeCompletedTimestamp();
067
068    @ManagedAttribute(description = "Last Exchange Completed ExchangeId")
069    String getLastExchangeCompletedExchangeId();
070
071    @ManagedAttribute(description = "First Exchange Completed Timestamp")
072    Date getFirstExchangeCompletedTimestamp();
073
074    @ManagedAttribute(description = "First Exchange Completed ExchangeId")
075    String getFirstExchangeCompletedExchangeId();
076
077    @ManagedAttribute(description = "Last Exchange Failed Timestamp")
078    Date getLastExchangeFailureTimestamp();
079
080    @ManagedAttribute(description = "Last Exchange Failed ExchangeId")
081    String getLastExchangeFailureExchangeId();
082
083    @ManagedAttribute(description = "First Exchange Failed Timestamp")
084    Date getFirstExchangeFailureTimestamp();
085
086    @ManagedAttribute(description = "First Exchange Failed ExchangeId")
087    String getFirstExchangeFailureExchangeId();
088
089    @ManagedAttribute(description = "Statistics enabled")
090    boolean isStatisticsEnabled();
091
092    @ManagedAttribute(description = "Statistics enabled")
093    void setStatisticsEnabled(boolean statisticsEnabled);
094
095    @ManagedOperation(description = "Dumps the statistics as XML")
096    String dumpStatsAsXml(boolean fullStats);
097
098}