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 = "Time in millis being idle (no messages incoming or inflight)")
063    long getIdleSince();
064
065    @ManagedAttribute(description = "Last Exchange Created Timestamp")
066    Date getLastExchangeCreatedTimestamp();
067
068    @ManagedAttribute(description = "Last Exchange Completed Timestamp")
069    Date getLastExchangeCompletedTimestamp();
070
071    @ManagedAttribute(description = "Last Exchange Completed ExchangeId")
072    String getLastExchangeCompletedExchangeId();
073
074    @ManagedAttribute(description = "First Exchange Completed Timestamp")
075    Date getFirstExchangeCompletedTimestamp();
076
077    @ManagedAttribute(description = "First Exchange Completed ExchangeId")
078    String getFirstExchangeCompletedExchangeId();
079
080    @ManagedAttribute(description = "Last Exchange Failed Timestamp")
081    Date getLastExchangeFailureTimestamp();
082
083    @ManagedAttribute(description = "Last Exchange Failed ExchangeId")
084    String getLastExchangeFailureExchangeId();
085
086    @ManagedAttribute(description = "First Exchange Failed Timestamp")
087    Date getFirstExchangeFailureTimestamp();
088
089    @ManagedAttribute(description = "First Exchange Failed ExchangeId")
090    String getFirstExchangeFailureExchangeId();
091
092    @ManagedAttribute(description = "Statistics enabled")
093    boolean isStatisticsEnabled();
094
095    @ManagedAttribute(description = "Statistics enabled")
096    void setStatisticsEnabled(boolean statisticsEnabled);
097
098    @ManagedOperation(description = "Dumps the statistics as XML")
099    String dumpStatsAsXml(boolean fullStats);
100
101}