Package com.tenio.core.controller
Interface Controller
- All Superinterfaces:
Service,ServiceListener
- All Known Subinterfaces:
InternalProcessorService
- All Known Implementing Classes:
AbstractController,InternalProcessorServiceImpl
All supported APIs for a controller.
-
Method Summary
Modifier and TypeMethodDescriptionvoidenqueueRequest(Request request) Enqueue a request from a request queue for processing.intRetrieves the maximum size of a request queue.floatRetrieves the current percentage using of a request queue.intRetrieves the thread pool size using for processes.voidsetMaxRequestQueueSize(int maxSize) Sets the maximum value size for the request queue.voidsetThreadPoolSize(int maxSize) Set the thread pool size using for processes.Methods inherited from interface com.tenio.core.service.Service
getName, initialize, isActivated, setName, shutdown, startMethods inherited from interface com.tenio.core.service.ServiceListener
onDestroyed, onInitialized, onRunning, onShutdown, onStarted
-
Method Details
-
enqueueRequest
Enqueue a request from a request queue for processing.- Parameters:
request- the processingRequest- Throws:
RequestQueueFullException- when the request queue is full
-
getMaxRequestQueueSize
int getMaxRequestQueueSize()Retrieves the maximum size of a request queue.- Returns:
- the maximum request queue size (
integervalue)
-
setMaxRequestQueueSize
void setMaxRequestQueueSize(int maxSize) Sets the maximum value size for the request queue.- Parameters:
maxSize- the maximum size of a request queue (integervalue)
-
getPercentageUsedRequestQueue
float getPercentageUsedRequestQueue()Retrieves the current percentage using of a request queue.- Returns:
- the percentage of using (
floatvalue)
-
getThreadPoolSize
int getThreadPoolSize()Retrieves the thread pool size using for processes.- Returns:
- the thread pool size (
integervalue)
-
setThreadPoolSize
void setThreadPoolSize(int maxSize) Set the thread pool size using for processes.- Parameters:
maxSize- the thread pool size (integervalue)
-