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 org.apache.camel.api.management.ManagedAttribute; 020import org.apache.camel.api.management.ManagedOperation; 021 022public interface ManagedThreadPoolMBean { 023 024 @ManagedAttribute(description = "Camel ID") 025 String getCamelId(); 026 027 @ManagedAttribute(description = "Camel ManagementName") 028 String getCamelManagementName(); 029 030 @ManagedAttribute(description = "Thread Pool ID") 031 String getId(); 032 033 @ManagedAttribute(description = "ID of source for creating Thread Pool") 034 String getSourceId(); 035 036 @ManagedAttribute(description = "Route ID for the source, which created the Thread Pool") 037 String getRouteId(); 038 039 @ManagedAttribute(description = "ID of the thread pool profile which this pool is based upon") 040 String getThreadPoolProfileId(); 041 042 @ManagedAttribute(description = "Core pool size") 043 int getCorePoolSize(); 044 045 @ManagedAttribute(description = "Core pool size") 046 void setCorePoolSize(int corePoolSize); 047 048 @ManagedAttribute(description = "Pool size") 049 int getPoolSize(); 050 051 @ManagedAttribute(description = "Maximum pool size") 052 int getMaximumPoolSize(); 053 054 @ManagedAttribute(description = "Maximum pool size") 055 void setMaximumPoolSize(int maximumPoolSize); 056 057 @ManagedAttribute(description = "Largest pool size") 058 int getLargestPoolSize(); 059 060 @ManagedAttribute(description = "Active count") 061 int getActiveCount(); 062 063 @ManagedAttribute(description = "Task count") 064 long getTaskCount(); 065 066 @ManagedAttribute(description = "Completed task count") 067 long getCompletedTaskCount(); 068 069 @ManagedAttribute(description = "Task queue size") 070 long getTaskQueueSize(); 071 072 @ManagedAttribute(description = "Is task queue empty") 073 boolean isTaskQueueEmpty(); 074 075 @ManagedAttribute(description = "Keep alive time in seconds") 076 long getKeepAliveTime(); 077 078 @ManagedAttribute(description = "Keep alive time in seconds") 079 void setKeepAliveTime(long keepAliveTimeInSeconds); 080 081 @ManagedAttribute(description = "Whether core threads is allowed to timeout if no tasks in queue to process") 082 boolean isAllowCoreThreadTimeout(); 083 084 @ManagedAttribute(description = "Whether core threads is allowed to timeout if no tasks in queue to process") 085 void setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout); 086 087 @ManagedAttribute(description = "Is shutdown") 088 boolean isShutdown(); 089 090 @ManagedOperation(description = "Purges the pool") 091 void purge(); 092 093 @ManagedOperation(description = "Returns the number of additional elements that the Task queue can" 094 + " ideally (in the absence of memory or resource constraints) accept") 095 int getTaskQueueRemainingCapacity(); 096}