com.octo.captcha.engine.bufferedengine.manager
Interface BufferedEngineContainerManager

All Known Implementing Classes:
QuartzBufferedEngineManager

public interface BufferedEngineContainerManager

Interface that adds manageability options to the BufferedEngineContainer


Method Summary
 void clearPersistentBuffer()
          Clear the persitent buffer
 void clearVolatileBuffer()
          Clear the volatile buffer
 int getFeedSize()
          Get number of captchas to feed the disk buffer
 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()
           
 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 resume()
          Resume the scheduler, both the swapping and the feeding process are resumed
 void setFeedSize(int feedSize)
           
 void setLocaleRatio(java.lang.String localeName, double ratio)
           
 void setMaxPersistentMemorySize(int size)
           
 void setMaxVolatileMemorySize(int size)
           
 void setSwapSize(int size)
           
 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
 

Method Detail

getFeedSize

int getFeedSize()
Get number of captchas to feed the disk buffer


setFeedSize

void setFeedSize(int feedSize)
Parameters:
feedSize - Set number of captchas to produce at each iteration.

setSwapSize

void setSwapSize(int size)
Parameters:
size - Set number of captchas to swap between the volatil buffer and the disk buffer

getSwapSize

int getSwapSize()
Get number of captchas to swap between the volatil buffer and the disk buffer


setMaxVolatileMemorySize

void setMaxVolatileMemorySize(int size)
Parameters:
size - Set maximun size for the volatile buffer

getMaxVolatileMemorySize

int getMaxVolatileMemorySize()
Get maximun size for the volatile buffer


setMaxPersistentMemorySize

void setMaxPersistentMemorySize(int size)
Parameters:
size - Set maximum size for the disk buffer

getMaxPersistentMemorySize

int getMaxPersistentMemorySize()
Get maximum size for the disk buffer


setLocaleRatio

void setLocaleRatio(java.lang.String localeName,
                    double ratio)
Parameters:
localeName - Name of th locale to set or to create
ratio - The ratio of the locale

getVolatileMemoryHits

int getVolatileMemoryHits()
Returns:
the number of volatile memory access

getPersistentMemoryHits

int getPersistentMemoryHits()
Returns:
the number of persistent accesses

getPersistentFeedings

int getPersistentFeedings()
Returns:
the number of disk feedings

getPersistentToVolatileSwaps

int getPersistentToVolatileSwaps()
Returns:
the number of swap from disk to memory

getVolatileBufferSize

int getVolatileBufferSize()
Returns:
the size of the volatile Buffer (RAM buffer)

getVolatileBufferSizeByLocales

HashedMap getVolatileBufferSizeByLocales()
Returns:
an hashedMap of sizes by locale

getPersistentBufferSize

int getPersistentBufferSize()
Returns:
the size of the persitent Buffer (disk buffer)

getPersistentBufferSizesByLocales

HashedMap getPersistentBufferSizesByLocales()
Returns:
an hashedMap of sizes by locale

startToFeedPersistantBuffer

void startToFeedPersistantBuffer()
Tell the scheduler to start to feed the persistent buffer


stopToFeedPersistentBuffer

void stopToFeedPersistentBuffer()
Tell the scheduler to stop to feed the persistent buffer


startToSwapFromPersistentToVolatileMemory

void startToSwapFromPersistentToVolatileMemory()
Tell the scheduler to start to swap captchas from persistent buffer to memory buffer


stopToSwapFromPersistentToVolatileMemory

void stopToSwapFromPersistentToVolatileMemory()
Tell the scheduler to stop to swap captchas from persistent buffer to memory buffer


clearVolatileBuffer

void clearVolatileBuffer()
Clear the volatile buffer


clearPersistentBuffer

void clearPersistentBuffer()
Clear the persitent buffer


pause

void pause()
Pause the scheduler, both the swapping and the feeding process are paused


resume

void resume()
Resume the scheduler, both the swapping and the feeding process are resumed


shutdown

void shutdown()
Shutdown scheduling, the container will use its memory buffer until its empty and swtich to the engine.



Copyright 2003-2009 JCaptcha. All Rights Reserved.