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