Package com.tenio.core.controller
Interface Controller
- All Superinterfaces:
Service,ServiceListener
- All Known Subinterfaces:
InternalProcessorService
- All Known Implementing Classes:
AbstractController,InternalProcessorServiceImpl
The supported APIs for a controller.
-
Method Summary
Modifier and TypeMethodDescriptionvoidenqueueRequest(Request request) Enqueue a request for processing.intRetrieves the max request size.floatRetrieves the current percentage using of request queue.intRetrieves the thread pool size.voidsetMaxRequestQueueSize(int maxSize) Set the maximum value size for the queue.voidsetThreadPoolSize(int maxSize) Set the thread pool size.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 for processing.- Parameters:
request- the request- Throws:
RequestQueueFullException- when the queue is full
-
getMaxRequestQueueSize
int getMaxRequestQueueSize()Retrieves the max request size.- Returns:
- the max request size
-
setMaxRequestQueueSize
void setMaxRequestQueueSize(int maxSize) Set the maximum value size for the queue.- Parameters:
maxSize- the max size
-
getPercentageUsedRequestQueue
float getPercentageUsedRequestQueue()Retrieves the current percentage using of request queue.- Returns:
- the percentage
-
getThreadPoolSize
int getThreadPoolSize()Retrieves the thread pool size.- Returns:
- the thread pool size
-
setThreadPoolSize
void setThreadPoolSize(int maxSize) Set the thread pool size.- Parameters:
maxSize- the max size
-