|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.octo.captcha.engine.bufferedengine.manager.QuartzBufferedEngineManager
public class QuartzBufferedEngineManager
Manager of a Quartz Buffered Engine
Constructor Summary | |
---|---|
QuartzBufferedEngineManager(QuartzBufferedEngineContainer container,
org.quartz.Scheduler factory,
CronTrigger cronFeeder,
CronTrigger cronSwapper,
JobDetail jobFeeder,
JobDetail jobSwapper)
Constructor of the manager |
Method Summary | |
---|---|
void |
clearPersistentBuffer()
Clear the persitent buffer |
void |
clearVolatileBuffer()
Clear the volatile buffer |
java.lang.String |
getFeedCronExpr()
|
int |
getFeedSize()
Get number of captchas to feed the disk buffer |
protected java.util.Locale |
getLocaleFromName(java.lang.String localeName)
|
HashedMap |
getLocaleRatio()
|
int |
getMaxPersistentMemorySize()
Get maximum size for the disk buffer |
int |
getMaxVolatileMemorySize()
Get maximun size for the volatile buffer |
int |
getPersistentBufferSize()
|
HashedMap |
getPersistentBufferSizesByLocales()
|
int |
getPersistentFeedings()
|
int |
getPersistentMemoryHits()
|
int |
getPersistentToVolatileSwaps()
|
java.lang.String |
getSwapCronExpr()
|
int |
getSwapSize()
Get number of captchas to swap between the volatil buffer and the disk buffer |
int |
getVolatileBufferSize()
|
HashedMap |
getVolatileBufferSizeByLocales()
|
int |
getVolatileMemoryHits()
|
void |
pause()
Pause the scheduler, both the swapping and the feeding process are paused |
void |
removeLocaleRatio(java.lang.String localeName)
|
void |
resume()
Resume the scheduler, both the swapping and the feeding process are resumed |
void |
setFeedCronExpr(java.lang.String feedCronExpr)
Set the cron expression for feeding operations |
void |
setFeedSize(int feedSize)
|
void |
setLocaleRatio(java.lang.String localeName,
double ratio)
|
void |
setMaxPersistentMemorySize(int maxPersistentMemorySize)
|
void |
setMaxVolatileMemorySize(int maxVolatileMemorySize)
|
void |
setSwapCronExpr(java.lang.String swapCronExpr)
Set the cron expression for swapping operations |
void |
setSwapSize(int swapSize)
|
void |
shutdown()
Shutdown scheduling, the container will use its memory buffer until its empty and swtich to the engine. |
void |
startToFeedPersistantBuffer()
Tell the scheduler to start to feed the persistent buffer |
void |
startToSwapFromPersistentToVolatileMemory()
Tell the scheduler to start to swap captchas from persistent buffer to memory buffer |
void |
stopToFeedPersistentBuffer()
Tell the scheduler to stop to feed the persistent buffer |
void |
stopToSwapFromPersistentToVolatileMemory()
Tell the scheduler to stop to swap captchas from persistent buffer to memory buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuartzBufferedEngineManager(QuartzBufferedEngineContainer container, org.quartz.Scheduler factory, CronTrigger cronFeeder, CronTrigger cronSwapper, JobDetail jobFeeder, JobDetail jobSwapper)
container
- The QuartzBufferedEngineContainerfactory
- The scheduler Factory to manipulate Qua rtzcronFeeder
- The CronTrigger that feed the persistent memorycronSwapper
- The CronTrigger that swap between the persistent memory and the volatile memoryjobFeeder
- Job detail of the feeding jobjobSwapper
- Job detail of the swapping jobMethod Detail |
---|
public void startToFeedPersistantBuffer()
BufferedEngineContainerManager
startToFeedPersistantBuffer
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.startToFeedPersistantBuffer()
public void stopToFeedPersistentBuffer()
BufferedEngineContainerManager
stopToFeedPersistentBuffer
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.stopToFeedPersistentBuffer()
public void startToSwapFromPersistentToVolatileMemory()
BufferedEngineContainerManager
startToSwapFromPersistentToVolatileMemory
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.startToSwapFromPersistentToVolatileMemory()
public void stopToSwapFromPersistentToVolatileMemory()
BufferedEngineContainerManager
stopToSwapFromPersistentToVolatileMemory
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.stopToSwapFromPersistentToVolatileMemory()
public void setFeedCronExpr(java.lang.String feedCronExpr)
feedCronExpr
- the cron expression in a quartz waypublic void setSwapCronExpr(java.lang.String swapCronExpr)
swapCronExpr
- the cron expression in a quartz waypublic java.lang.String getFeedCronExpr()
public java.lang.String getSwapCronExpr()
public void pause()
BufferedEngineContainerManager
pause
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.pause()
public void resume()
BufferedEngineContainerManager
resume
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.resume()
public void shutdown()
BufferedEngineContainerManager
shutdown
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.shutdown()
public int getPersistentFeedings()
getPersistentFeedings
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getPersistentFeedings()
public int getPersistentMemoryHits()
getPersistentMemoryHits
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getPersistentMemoryHits()
public int getPersistentToVolatileSwaps()
getPersistentToVolatileSwaps
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getPersistentToVolatileSwaps()
public int getVolatileMemoryHits()
getVolatileMemoryHits
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getVolatileMemoryHits()
public int getFeedSize()
BufferedEngineContainerManager
getFeedSize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getFeedSize()
public void setFeedSize(int feedSize)
setFeedSize
in interface BufferedEngineContainerManager
feedSize
- Set number of captchas to produce at each iteration.BufferedEngineContainerManager.setFeedSize(int)
public HashedMap getLocaleRatio()
com.octo.captcha.engine.bufferedengine.manager.BufferedEngineContainerManager#getLocaleRatio
public void setLocaleRatio(java.lang.String localeName, double ratio)
setLocaleRatio
in interface BufferedEngineContainerManager
localeName
- Name of th locale to set or to createratio
- The ratio of the localeBufferedEngineContainerManager.setLocaleRatio(java.lang.String, double)
protected java.util.Locale getLocaleFromName(java.lang.String localeName)
com.octo.captcha.engine.bufferedengine.manager.BufferedEngineContainerManager#getLocaleFromName
public void removeLocaleRatio(java.lang.String localeName)
com.octo.captcha.engine.bufferedengine.manager.BufferedEngineContainerManager#removeLocaleRatio
public int getMaxPersistentMemorySize()
BufferedEngineContainerManager
getMaxPersistentMemorySize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getMaxPersistentMemorySize()
public void setMaxPersistentMemorySize(int maxPersistentMemorySize)
setMaxPersistentMemorySize
in interface BufferedEngineContainerManager
maxPersistentMemorySize
- Set maximum size for the disk bufferBufferedEngineContainerManager.setMaxPersistentMemorySize(int)
public int getMaxVolatileMemorySize()
BufferedEngineContainerManager
getMaxVolatileMemorySize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getMaxVolatileMemorySize()
public void setMaxVolatileMemorySize(int maxVolatileMemorySize)
setMaxVolatileMemorySize
in interface BufferedEngineContainerManager
maxVolatileMemorySize
- Set maximun size for the volatile bufferBufferedEngineContainerManager.setMaxVolatileMemorySize(int)
public int getSwapSize()
BufferedEngineContainerManager
getSwapSize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getSwapSize()
public void setSwapSize(int swapSize)
setSwapSize
in interface BufferedEngineContainerManager
swapSize
- Set number of captchas to swap between the volatil buffer and the disk bufferBufferedEngineContainerManager.setSwapSize(int)
public int getVolatileBufferSize()
getVolatileBufferSize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getVolatileBufferSize()
public HashedMap getVolatileBufferSizeByLocales()
getVolatileBufferSizeByLocales
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getVolatileBufferSizeByLocales()
public int getPersistentBufferSize()
getPersistentBufferSize
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getPersistentBufferSize()
public HashedMap getPersistentBufferSizesByLocales()
getPersistentBufferSizesByLocales
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.getPersistentBufferSizesByLocales()
public void clearVolatileBuffer()
BufferedEngineContainerManager
clearVolatileBuffer
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.clearVolatileBuffer()
public void clearPersistentBuffer()
BufferedEngineContainerManager
clearPersistentBuffer
in interface BufferedEngineContainerManager
BufferedEngineContainerManager.clearPersistentBuffer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |