Class LibreOfficeInstancePool
- java.lang.Object
-
- com.levigo.jadice.server.core.util.ManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
-
- com.levigo.jadice.server.libreoffice.server.LibreOfficeInstancePool
-
- All Implemented Interfaces:
SelfRegistering
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.jmx.export.naming.SelfNaming
@ManagedResource(description="LibreOffice instance pool") public class LibreOfficeInstancePool extends ManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
-
-
Constructor Summary
Constructors Constructor Description LibreOfficeInstancePool()
Initialize anLibreOfficeInstancePool
with default parametersLibreOfficeInstancePool(int maxActive, long maxWait, int maxIdle, int maxUsageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance
doBorrowObject(File tempFolder)
Borrows a LibreOffice instance that works within the given temporary folderprotected void
doInvalidateObject(com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance obj)
protected void
doReturnObject(com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance object)
protected org.jadice.util.log.Logger
getLogger()
int
getMaxUsageCount()
protected String
getName()
protected org.apache.commons.pool.impl.GenericKeyedObjectPool
getPool()
boolean
isEnableDebug()
boolean
isUseXvfb()
void
setEnableDebug(boolean enableDebug)
void
setMaxUsageCount(int maxUsageCount)
void
setUseXvfb(boolean useXvfb)
-
Methods inherited from class com.levigo.jadice.server.core.util.ManagedObjectPool
afterPropertiesSet, borrowObject, clearOldest, clearPool, clearWaitingTimes, destroy, evictPool, getAvgWaitingTime, getMaxActive, getMaxIdle, getMinEvictableIdleTimeMillis, getMinIdle, getNumActive, getNumIdle, getNumInvalidated, getNumReturned, getObjectName, getRecentAvgWaitingTime, getRecentMaxWaitingTime, getRecentMinWaitingTime, getTimeBetweenEvictionRunsMillis, invalidateObject, returnObject, setMaxActive, setMaxIdle, setMinEvictableIdleTimeMillis, setMinIdle, setTimeBetweenEvictionRunsMillis
-
-
-
-
Constructor Detail
-
LibreOfficeInstancePool
public LibreOfficeInstancePool()
Initialize anLibreOfficeInstancePool
with default parameters
-
LibreOfficeInstancePool
public LibreOfficeInstancePool(int maxActive, long maxWait, int maxIdle, int maxUsageCount)
-
-
Method Detail
-
doBorrowObject
protected com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance doBorrowObject(File tempFolder) throws Exception
Borrows a LibreOffice instance that works within the given temporary folder- Specified by:
doBorrowObject
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
- Parameters:
tempFolder
- the temporary folder which LO shall use- Throws:
Exception
- See Also:
ManagedObjectPool.borrowObject(Object)
-
doReturnObject
protected void doReturnObject(com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance object) throws Exception
- Specified by:
doReturnObject
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
- Throws:
Exception
-
doInvalidateObject
protected void doInvalidateObject(com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance obj) throws Exception
- Specified by:
doInvalidateObject
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
- Throws:
Exception
-
getName
protected String getName()
- Specified by:
getName
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
-
getLogger
protected org.jadice.util.log.Logger getLogger()
- Specified by:
getLogger
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
-
getPool
protected org.apache.commons.pool.impl.GenericKeyedObjectPool getPool()
- Specified by:
getPool
in classManagedObjectPool<File,com.levigo.jadice.server.libreoffice.server.internal.ManagedLibreOfficeInstance>
-
isUseXvfb
public boolean isUseXvfb()
-
setUseXvfb
public void setUseXvfb(boolean useXvfb)
-
isEnableDebug
public boolean isEnableDebug()
-
setEnableDebug
public void setEnableDebug(boolean enableDebug)
-
getMaxUsageCount
@ManagedAttribute(description="Maximum number of usages of a LibreOffice instance") public int getMaxUsageCount()
-
setMaxUsageCount
@ManagedAttribute(description="Maximum number of usages of a LibreOffice instance") public void setMaxUsageCount(int maxUsageCount)
-
-