|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.net.proxy.DefaultProxyServiceThreadPoolSizing
public class DefaultProxyServiceThreadPoolSizing
Default ThreadPoolSizingStrategy implementation for ProxyService.
This implementation will attempt to ensure that the thread pool will be sized to meet client demand. When the thread pool reaches its size limit, a warning message is logged.
Nested Class Summary | |
---|---|
protected class |
DefaultProxyServiceThreadPoolSizing.PoolContext PoolContext holds the working view of the usage of the thread pool throughout the analysis and is used to adjust the pool size during analysis. |
Field Summary | |
---|---|
protected DefaultProxyServiceThreadPoolSizing.PoolContext |
m_ctxLast The last analysis context. |
protected boolean |
m_fPrintWarning A flag to indicate if a warning message should be printed. |
protected long |
m_ltdLastPrintTime The last time in milliseconds, that a warning message was printed. |
protected ThreadPoolManager |
m_mgrPool The ThreadPoolManager. |
static int |
PRINT_WARNING_INTERVAL The time interval for printing the warning message. |
Constructor Summary | |
---|---|
DefaultProxyServiceThreadPoolSizing() Default constructor. |
Method Summary | |
---|---|
int |
adjustPoolSize() Analyze the thread usage of the thread pool. |
protected int |
adjustPoolSize(DefaultProxyServiceThreadPoolSizing.PoolContext ctx) Analyze the load statistics using the specified analysis context and return the target pool size if adjustment is necessary. |
java.lang.String |
getDescription() Return a human-readable description of the state of the ThreadPoolSizingStrategy. |
DefaultProxyServiceThreadPoolSizing.PoolContext |
getLastPoolContext() Return the last PoolContext. |
ThreadPoolManager |
getManager() Return the ThreadPoolManager this ThreadPoolSizingStrategy is bound to. |
void |
init(ThreadPoolManager mgr) Initialize the ThreadPoolSizingStrategy and bind it to the specified manager. |
DefaultProxyServiceThreadPoolSizing.PoolContext |
instantiatePoolContext() Factory method. |
void |
setLastPoolContext(DefaultProxyServiceThreadPoolSizing.PoolContext ctx) Set the last PoolContext. |
Field Detail |
---|
public static final int PRINT_WARNING_INTERVAL
protected ThreadPoolManager m_mgrPool
protected DefaultProxyServiceThreadPoolSizing.PoolContext m_ctxLast
protected boolean m_fPrintWarning
protected long m_ltdLastPrintTime
Constructor Detail |
---|
public DefaultProxyServiceThreadPoolSizing()
Method Detail |
---|
public ThreadPoolManager getManager()
public DefaultProxyServiceThreadPoolSizing.PoolContext getLastPoolContext()
public void setLastPoolContext(DefaultProxyServiceThreadPoolSizing.PoolContext ctx)
ctx
- the PoolContextpublic void init(ThreadPoolManager mgr)
init
in interface ThreadPoolSizingStrategy
mgr
- the ThreadPoolManager this strategy will be bound topublic int adjustPoolSize()
The mutation of the statistics information exposed by the Coherence thread pool for the duration of this method call should have minimum impact on the target thread pool size.
adjustPoolSize
in interface ThreadPoolSizingStrategy
public java.lang.String getDescription()
getDescription
in interface ThreadPoolSizingStrategy
protected int adjustPoolSize(DefaultProxyServiceThreadPoolSizing.PoolContext ctx)
ctx
- the analysis contextpublic DefaultProxyServiceThreadPoolSizing.PoolContext instantiatePoolContext()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |