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.concurrent.TimeUnit;
020
021import org.apache.camel.api.management.ManagedAttribute;
022
023public interface ManagedShutdownStrategyMBean extends ManagedServiceMBean {
024
025    @ManagedAttribute(description = "Shutdown timeout")
026    void setTimeout(long timeout);
027
028    @ManagedAttribute(description = "Shutdown timeout")
029    long getTimeout();
030
031    @ManagedAttribute(description = "Shutdown timeout time unit")
032    void setTimeUnit(TimeUnit timeUnit);
033
034    @ManagedAttribute(description = "Shutdown timeout time unit")
035    TimeUnit getTimeUnit();
036
037    @ManagedAttribute(description = "Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening.")
038    void setSuppressLoggingOnTimeout(boolean suppressLoggingOnTimeout);
039
040    @ManagedAttribute(description = "Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening.")
041    boolean isSuppressLoggingOnTimeout();
042
043    @ManagedAttribute(description = "Whether to force shutdown of all consumers when a timeout occurred.")
044    void setShutdownNowOnTimeout(boolean shutdownNowOnTimeout);
045
046    @ManagedAttribute(description = "Whether to force shutdown of all consumers when a timeout occurred.")
047    boolean isShutdownNowOnTimeout();
048
049    @ManagedAttribute(description = "Sets whether routes should be shutdown in reverse or the same order as they were started")
050    void setShutdownRoutesInReverseOrder(boolean shutdownRoutesInReverseOrder);
051
052    @ManagedAttribute(description = "Sets whether routes should be shutdown in reverse or the same order as they were started")
053    boolean isShutdownRoutesInReverseOrder();
054
055    @ManagedAttribute(description = "Whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout.")
056    void setLogInflightExchangesOnTimeout(boolean logInflightExchangesOnTimeout);
057
058    @ManagedAttribute(description = "Whether to log information about the inflight Exchanges which are still running during a shutdown which didn't complete without the given timeout.")
059    boolean isLogInflightExchangesOnTimeout();
060
061    @ManagedAttribute(description = "Whether the shutdown strategy is forcing to shutdown")
062    boolean isForceShutdown();
063
064    @ManagedAttribute(description = "Whether a timeout has occurred during a shutdown.")
065    boolean isTimeoutOccurred();
066
067    @ManagedAttribute(description = "logging level used for logging shutdown activity (such as starting and stopping routes). The default logging level is DEBUG.")
068    String getLoggingLevel();
069
070    @ManagedAttribute(description = "logging level used for logging shutdown activity (such as starting and stopping routes). The default logging level is DEBUG.")
071    void setLoggingLevel(String loggingLevel);
072
073}