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 TypeMethodDescriptionvoid
enqueueRequest
(Request request) Enqueue a request for processing.int
Retrieves the max request size.float
Retrieves the current percentage using of request queue.int
Retrieves the thread pool size.void
setMaxRequestQueueSize
(int maxSize) Set the maximum value size for the queue.void
setThreadPoolSize
(int maxSize) Set the thread pool size.Methods inherited from interface com.tenio.core.service.Service
getName, initialize, isActivated, setName, shutdown, start
Methods 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
-