Package com.tangosol.net
Interface ServiceDependencies
public interface ServiceDependencies
The ServiceDependencies interface defines externally provided dependencies
for
clustered services
.- Since:
- Coherence 12.1.3
- Author:
- pfm 2011.05.12
-
Method Summary
Modifier and TypeMethodDescriptionint
Obtain the priority of the event dispatcher thread.com.tangosol.internal.health.HealthCheckDependencies
Returns the service'sHealthCheckDependencies
.long
Obtain a default request timeout value.Obtain theSerializerFactory
used by this service.long
Obtain the amount of time that a task can execute before it's considered "hung".long
Obtain the default task timeout value.int
Obtain the priority of the service thread.int
Deprecated.int
Obtain the maximum number of background worker threads.int
Obtain the minimum number of background worker threads.int
Obtain the priority of the worker threads.
-
Method Details
-
getEventDispatcherThreadPriority
int getEventDispatcherThreadPriority()Obtain the priority of the event dispatcher thread. The returned value must be an integer betweenThread.MIN_PRIORITY
andThread.MAX_PRIORITY
.- Returns:
- the event dispatcher thread priority
-
getSerializerFactory
SerializerFactory getSerializerFactory()Obtain theSerializerFactory
used by this service.- Returns:
- the SerializerFactory
-
getRequestTimeoutMillis
long getRequestTimeoutMillis()Obtain a default request timeout value. This is also a default value forPriorityTasks
.- Returns:
- the default request timeout
-
getTaskHungThresholdMillis
long getTaskHungThresholdMillis()Obtain the amount of time that a task can execute before it's considered "hung".- Returns:
- the task hung threshold
-
getTaskTimeoutMillis
long getTaskTimeoutMillis()Obtain the default task timeout value. This value is used as a default forPriorityTasks
.- Returns:
- the default task timeout
-
getThreadPriority
int getThreadPriority()Obtain the priority of the service thread. The returned value must be an integer betweenThread.MIN_PRIORITY
andThread.MAX_PRIORITY
.- Returns:
- the service thread priority
-
getWorkerThreadCount
int getWorkerThreadCount()Deprecated.Since 12.2.1, replaced by returning the same value fromgetWorkerThreadCountMin()
andgetWorkerThreadCountMax()
.Obtain the number of background worker threads that will be created when the service is started.- A value of zero indicates that all requests should be processed by the service thread.
- A positive value indicates that a fixed-size thread pool of the specified size should be used to process service requests.
- A negative value indicates that requests should be processed either on the service thread or transport threads where possible.
- Returns:
- the worker thread count
-
getWorkerThreadCountMax
int getWorkerThreadCountMax()Obtain the maximum number of background worker threads.- A value of zero indicates that all requests should be processed by the service thread.
- A positive value indicates that a dynamic thread pool of the maximum specified size should be used to process service requests.
- A negative value indicates that requests should be processed either on the service thread or transport threads where possible.
- Returns:
- the maximum worker thread count
-
getWorkerThreadCountMin
int getWorkerThreadCountMin()Obtain the minimum number of background worker threads.- A value of zero indicates that all requests should be processed by the service thread.
- A positive value indicates that a dynamic thread pool of the minimum specified size should be used to process service requests.
- A negative value indicates that requests should be processed either on the service thread or transport threads where possible.
- Returns:
- the minimum worker thread count
-
getWorkerThreadPriority
int getWorkerThreadPriority()Obtain the priority of the worker threads. The returned value must be an integer betweenThread.MIN_PRIORITY
andThread.MAX_PRIORITY
.- Returns:
- the worker thread priority
-
getHealthCheckDependencies
com.tangosol.internal.health.HealthCheckDependencies getHealthCheckDependencies()Returns the service'sHealthCheckDependencies
.- Returns:
- the service's
HealthCheckDependencies
-
getWorkerThreadCountMin()
andgetWorkerThreadCountMax()
.