001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.ksb.messaging.threadpool; 017 018 019import java.util.concurrent.BlockingQueue; 020import java.util.concurrent.ExecutorService; 021 022import org.kuali.rice.core.api.lifecycle.Lifecycle; 023 024/** 025 * A thread pool which can be used to schedule asynchronous tasks. 026 * 027 * @author Kuali Rice Team (rice.collab@kuali.org) 028 */ 029public interface KSBThreadPool extends ExecutorService, Lifecycle { 030 031 public boolean remove(Runnable task); 032 033 public int getActiveCount(); 034 035 public void setCorePoolSize(int corePoolSize); 036 037 public int getCorePoolSize(); 038 039 public int getMaximumPoolSize(); 040 041 public void setMaximumPoolSize(int maxPoolSize); 042 043 public int getPoolSize(); 044 045 public int getLargestPoolSize(); 046 047 public long getKeepAliveTime(); 048 049 public long getTaskCount(); 050 051 public long getCompletedTaskCount(); 052 053 public BlockingQueue getQueue(); 054 055 public Object getInstance(); 056} 057