Package org.bedework.util.servlet.io
Class PooledBuffers
- java.lang.Object
-
- org.bedework.util.jmx.ConfBase<PooledBuffersPropertiesImpl>
-
- org.bedework.util.servlet.io.PooledBuffers
-
- All Implemented Interfaces:
org.bedework.util.jmx.BaseMBean,org.bedework.util.jmx.ConfBaseMBean,org.bedework.util.logging.Logged,PooledBuffersMBean,PooledBuffersProperties
public class PooledBuffers extends org.bedework.util.jmx.ConfBase<PooledBuffersPropertiesImpl> implements PooledBuffersMBean
See if we can't manage buffers better than the standard java classes - at least for the specific use we have. We are generating a lot of output and causing a lot of expansion and copying.This may result in a lot of JVM churn. See if a pool of buffers can improve matters.
- Author:
- Mike Douglass
-
-
Field Summary
Fields Modifier and Type Field Description static StringconfuriPname
-
Constructor Summary
Constructors Constructor Description PooledBuffers()Creates a new pooled buffered output stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLargeBufferPoolSize()StringgetLargeBufferPoolStats()intgetLargeBufferSize()intgetMediumBufferPoolSize()StringgetMediumBufferPoolStats()intgetMediumBufferSize()static StringgetServiceName(String name)intgetSmallBufferPoolSize()StringgetSmallBufferPoolStats()intgetSmallBufferSize()StringloadConfig()voidsetLargeBufferPoolSize(int val)voidsetLargeBufferSize(int val)voidsetMediumBufferPoolSize(int val)voidsetMediumBufferSize(int val)voidsetSmallBufferPoolSize(int val)voidsetSmallBufferSize(int val)-
Methods inherited from class org.bedework.util.jmx.ConfBase
createObjectName, getConfig, getConfigInfo, getConfigInfo, getConfigInfo, getConfigName, getConfigPname, getConfigUri, getLogger, getManagementContext, getPathSuffix, getRegisteredMBeans, getServiceName, getServiceObjectName, getStatus, getStore, isRunning, loadConfig, loadOnlyConfig, makeObject, register, register, saveConfig, setConfigName, setConfigPname, setConfigUri, setPathSuffix, setServiceName, setStatus, setStore, start, stop, unregister, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.jmx.BaseMBean
getServiceName, isRunning, start, stop
-
Methods inherited from interface org.bedework.util.jmx.ConfBaseMBean
getConfigName, getStatus, saveConfig, setConfigName, setStatus
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, setLogLevel, trace, trace, warn
-
-
-
-
Field Detail
-
confuriPname
public static final String confuriPname
- See Also:
- Constant Field Values
-
-
Method Detail
-
getServiceName
public static String getServiceName(String name)
- Parameters:
name-- Returns:
- object name value for the mbean with this name
-
loadConfig
public String loadConfig()
- Specified by:
loadConfigin classorg.bedework.util.jmx.ConfBase<PooledBuffersPropertiesImpl>
-
getSmallBufferSize
public int getSmallBufferSize()
- Specified by:
getSmallBufferSizein interfacePooledBuffersProperties- Returns:
- the size of each byte buffer
-
setSmallBufferSize
public void setSmallBufferSize(int val)
- Specified by:
setSmallBufferSizein interfacePooledBuffersProperties- Parameters:
val- the size of each byte buffer
-
getMediumBufferSize
public int getMediumBufferSize()
- Specified by:
getMediumBufferSizein interfacePooledBuffersProperties- Returns:
- the size of each byte buffer
-
setMediumBufferSize
public void setMediumBufferSize(int val)
- Specified by:
setMediumBufferSizein interfacePooledBuffersProperties- Parameters:
val- the size of each byte buffer
-
getLargeBufferSize
public int getLargeBufferSize()
- Specified by:
getLargeBufferSizein interfacePooledBuffersProperties- Returns:
- the size of each byte buffer
-
setLargeBufferSize
public void setLargeBufferSize(int val)
- Specified by:
setLargeBufferSizein interfacePooledBuffersProperties- Parameters:
val- the size of each byte buffer
-
getSmallBufferPoolSize
public int getSmallBufferPoolSize()
- Specified by:
getSmallBufferPoolSizein interfacePooledBuffersProperties- Returns:
- the max number of buffers
-
setSmallBufferPoolSize
public void setSmallBufferPoolSize(int val)
- Specified by:
setSmallBufferPoolSizein interfacePooledBuffersProperties- Parameters:
val- the max number of buffers
-
getMediumBufferPoolSize
public int getMediumBufferPoolSize()
- Specified by:
getMediumBufferPoolSizein interfacePooledBuffersProperties- Returns:
- the max number of buffers
-
setMediumBufferPoolSize
public void setMediumBufferPoolSize(int val)
- Specified by:
setMediumBufferPoolSizein interfacePooledBuffersProperties- Parameters:
val- the max number of buffers
-
getLargeBufferPoolSize
public int getLargeBufferPoolSize()
- Specified by:
getLargeBufferPoolSizein interfacePooledBuffersProperties- Returns:
- the max number of buffers
-
setLargeBufferPoolSize
public void setLargeBufferPoolSize(int val)
- Specified by:
setLargeBufferPoolSizein interfacePooledBuffersProperties- Parameters:
val- the max number of buffers
-
getSmallBufferPoolStats
public String getSmallBufferPoolStats()
- Specified by:
getSmallBufferPoolStatsin interfacePooledBuffersMBean- Returns:
- buffer usage stats
-
getMediumBufferPoolStats
public String getMediumBufferPoolStats()
- Specified by:
getMediumBufferPoolStatsin interfacePooledBuffersMBean- Returns:
- buffer usage stats
-
getLargeBufferPoolStats
public String getLargeBufferPoolStats()
- Specified by:
getLargeBufferPoolStatsin interfacePooledBuffersMBean- Returns:
- buffer usage stats
-
-