Source Code Cross Referenced for ThreadPoolConfiguration.java in  » Inversion-of-Control » carbon » org » sape » carbon » services » threadpool » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Inversion of Control » carbon » org.sape.carbon.services.threadpool 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the Sapient Public License
003:         * Version 1.0 (the "License"); you may not use this file except in compliance
004:         * with the License. You may obtain a copy of the License at
005:         * http://carbon.sf.net/License.html.
006:         *
007:         * Software distributed under the License is distributed on an "AS IS" basis,
008:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009:         * the specific language governing rights and limitations under the License.
010:         *
011:         * The Original Code is The Carbon Component Framework.
012:         *
013:         * The Initial Developer of the Original Code is Sapient Corporation
014:         *
015:         * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
016:         */
017:
018:        package org.sape.carbon.services.threadpool;
019:
020:        import org.sape.carbon.core.component.ComponentConfiguration;
021:
022:        /**
023:         * Configuration for the DefaultThreadPoolImpl.
024:         *
025:         * <br>Copyright 2002 Sapient
026:         * @since carbon 1.1
027:         * @author Douglas Voet, Nov 5, 2002
028:         * @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/11/20 18:49:59 $)
029:         */
030:        public interface ThreadPoolConfiguration extends ComponentConfiguration {
031:            /** 
032:             * ThreadPoolSize determines the number of threads in the pool. Depending
033:             * on the the values of InitialThreadCount and KeepAliveTime, there may
034:             * be fewer threads in the pool, but never more. Required.
035:             */
036:            int getThreadPoolSize();
037:
038:            /** 
039:             * ThreadPoolSize determines the number of threads in the pool. Depending
040:             * on the the values of InitialThreadCount and KeepAliveTime, there may
041:             * be fewer threads in the pool, but never more. Required.
042:             */
043:            void setThreadPoolSize(int size);
044:
045:            /**
046:             * FailureListCapacity limits the number of failures that are tracked.
047:             * When this list fills, the oldest failure is removed before adding
048:             * the newest failure. Defaults to 100.
049:             */
050:            int FailureListCapacity = 100;
051:
052:            /**
053:             * FailureListCapacity limits the number of failures that are tracked.
054:             * When this list fills, the oldest failure is removed before adding
055:             * the newest failure. Defaults to 100.
056:             */
057:            int getFailureListCapacity();
058:
059:            /**
060:             * FailureListCapacity limits the number of failures that are tracked.
061:             * When this list fills, the oldest failure is removed before adding
062:             * the newest failure. Defaults to 100.
063:             */
064:            void setFailureListCapacity(int capacity);
065:
066:            /**
067:             * Tells the thread pool whether or not to use daemon threads. Defaults
068:             * to true. From the java.lang.Thread javadoc, 
069:             * "The Java Virtual Machine exits when the only threads running are all 
070:             * daemon threads."
071:             * 
072:             * @see Thread#setDaemon(boolean)
073:             */
074:            boolean UseDaemonThreads = true;
075:
076:            /**
077:             * Tells the thread pool whether or not to use daemon threads. Defaults
078:             * to true. From the java.lang.Thread javadoc, 
079:             * "The Java Virtual Machine exits when the only threads running are all 
080:             * daemon threads."
081:             * 
082:             * @see Thread#setDaemon(boolean)
083:             */
084:            boolean isUseDaemonThreads();
085:
086:            /**
087:             * Tells the thread pool whether or not to use daemon threads. Defaults
088:             * to true. From the java.lang.Thread javadoc, 
089:             * "The Java Virtual Machine exits when the only threads running are all 
090:             * daemon threads."
091:             * 
092:             * @see Thread#setDaemon(boolean)
093:             */
094:            void setUseDaemonThreads(boolean useDaemonThreads);
095:
096:            /**
097:             * If a thread in the pool has been idle longer than KeepAliveTime
098:             * (measured in milliseconds), it
099:             * will be allowed to terminate, releasing its resources. If this is set
100:             * to 0, the thread will not terminate unless interrupted.
101:             * Defaults to 300000 (5 minutes).
102:             */
103:            int KeepAliveTime = 300000;
104:
105:            /**
106:             * If a thread in the pool has been idle longer than KeepAliveTime
107:             * (measured in milliseconds), it
108:             * will be allowed to terminate, releasing its resources. If this is set
109:             * to 0, the thread will not terminate unless interrupted.
110:             * Defaults to 300000 (5 minutes).
111:             */
112:            int getKeepAliveTime();
113:
114:            /**
115:             * If a thread in the pool has been idle longer than KeepAliveTime
116:             * (measured in milliseconds), it
117:             * will be allowed to terminate, releasing its resources. If this is set
118:             * to 0, the thread will not terminate unless interrupted.
119:             * Defaults to 300000 (5 minutes).
120:             */
121:            void setKeepAliveTime(int milliseconds);
122:
123:            /**
124:             * QueueFullPolicy determines how the thread pool deals with new execute
125:             * requests when the pending queue is already full.
126:             * Defaults to QueueFullPolicyEnum.RUN which means that the new task will
127:             * execute on the current thread, not a pooled thread. 
128:             * 
129:             * @see QueueFullPolicyEnum
130:             */
131:            QueueFullPolicyEnum QueueFullPolicy = QueueFullPolicyEnum.RUN;
132:
133:            /**
134:             * QueueFullPolicy determines how the thread pool deals with new execute
135:             * requests when the pending queue is already full.
136:             * Defaults to QueueFullPolicyEnum.RUN which means that the new task will
137:             * execute on the current thread, not a pooled thread. 
138:             * 
139:             * @see QueueFullPolicyEnum
140:             */
141:            QueueFullPolicyEnum getQueueFullPolicy();
142:
143:            /**
144:             * QueueFullPolicy determines how the thread pool deals with new execute
145:             * requests when the pending queue is already full.
146:             * Defaults to QueueFullPolicyEnum.RUN which means that the new task will
147:             * execute on the current thread, not a pooled thread. 
148:             * 
149:             * @see QueueFullPolicyEnum
150:             */
151:            void setQueueFullPolicy(QueueFullPolicyEnum policy);
152:
153:            /** 
154:             * TaskQueueSize limits the number of tasks that can be waiting for
155:             * execution. This is required and must be greater than 0.
156:             */
157:            int getTaskQueueSize();
158:
159:            /** 
160:             * TaskQueueSize limits the number of tasks that can be waiting for
161:             * execution. This is required and must be greater than 0.
162:             */
163:            void setTaskQueueSize(int size);
164:
165:            /**
166:             * InitialThreadCount tells the thread pool how many threads to create
167:             * when it starts. Note that if KeepAliveTime is non-zero, these threads
168:             * may terminate. Defaults to 0.
169:             */
170:            int InitialThreadCount = 0;
171:
172:            int getInitialThreadCount();
173:
174:            void setInitialThreadCount(int count);
175:
176:            /**
177:             * If DiscardQueuedTasksOnShutdown is true, ShutdownWaitTime tells the
178:             * thread pool how long to wait in milliseconds for queued tasks to 
179:             * complete execution. Defaults to 1000 (1 second).
180:             */
181:            long ShutdownWaitTime = 1000;
182:
183:            /**
184:             * If DiscardQueuedTasksOnShutdown is true, ShutdownWaitTime tells the
185:             * thread pool how long to wait in milliseconds for queued tasks to 
186:             * complete execution. Defaults to 1000 (1 second).
187:             */
188:            long getShutdownWaitTime();
189:
190:            /**
191:             * If DiscardQueuedTasksOnShutdown is true, ShutdownWaitTime tells the
192:             * thread pool how long to wait in milliseconds for queued tasks to 
193:             * complete execution. Defaults to 1000 (1 second).
194:             */
195:            void setShutdownWaitTime(long milliseconds);
196:
197:            /**
198:             * DiscardQueuedTasksOnShutdown tells the thread pool whether or not to
199:             * wait for queued tasks to complete execution when the service is stopped.
200:             * Defaults to false.
201:             */
202:            boolean DiscardQueuedTasksOnShutdown = false;
203:
204:            /**
205:             * DiscardQueuedTasksOnShutdown tells the thread pool whether or not to
206:             * wait for queued tasks to complete execution when the service is stopped.
207:             * Defaults to false.
208:             */
209:            boolean getDiscardQueuedTasksOnShutdown();
210:
211:            /**
212:             * DiscardQueuedTasksOnShutdown tells the thread pool whether or not to
213:             * wait for queued tasks to complete execution when the service is stopped.
214:             * Defaults to false.
215:             */
216:            void setDiscardQueuedTasksOnShutdown(boolean discardTasks);
217:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.