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 TypeMethodDescriptionvoid
enqueueRequest
(Request request) Enqueue a request from a request queue for processing.int
Retrieves the maximum size of a request queue.float
Retrieves the current percentage using of a request queue.int
Retrieves the thread pool size using for processes.void
setMaxRequestQueueSize
(int maxSize) Sets the maximum value size for the request queue.void
setThreadPoolSize
(int maxSize) Set the thread pool size using for processes.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 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 (
integer
value)
-
setMaxRequestQueueSize
void setMaxRequestQueueSize(int maxSize) Sets the maximum value size for the request queue.- Parameters:
maxSize
- the maximum size of a request queue (integer
value)
-
getPercentageUsedRequestQueue
float getPercentageUsedRequestQueue()Retrieves the current percentage using of a request queue.- Returns:
- the percentage of using (
float
value)
-
getThreadPoolSize
int getThreadPoolSize()Retrieves the thread pool size using for processes.- Returns:
- the thread pool size (
integer
value)
-
setThreadPoolSize
void setThreadPoolSize(int maxSize) Set the thread pool size using for processes.- Parameters:
maxSize
- the thread pool size (integer
value)
-