|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.makumba.forms.responder.ResponderCacheManager
public class ResponderCacheManager
This class is handling the caching mechanism of the Responder. There are two caches: one memory cache and one cache on the disk. In case of server failure, responder objects are serialized on the disk so they can be retrieved again after restart and form data is not lost.
Field Summary | |
---|---|
(package private) static NamedResources |
cache
We cache the responder in the memory because if two forms are the same (often the case in multiple forms), their responder looks exactly the same. |
(package private) static Hashtable<Integer,Object> |
indexedCache
|
static String |
makumbaResponderBaseDirectory
The directory where makumba will store to and load responders from. |
Constructor Summary | |
---|---|
ResponderCacheManager()
|
Method Summary | |
---|---|
ResponderFactory |
getFactory()
|
static ResponderCacheManager |
getInstance()
|
(package private) Responder |
getResponder(String code,
String suffix,
String parentSuffix)
Fetches a responder from the cache. |
void |
setFactory(ResponderFactory factory)
|
void |
setResponderWorkingDir(HttpServletRequest request)
Sets the responder working directory from the "javax.servlet.context.tempdir" variable. |
void |
setResponderWorkingDir(Object tempDir,
String contextPath)
Sets the responder working directory from the given temp directory and context path. |
(package private) static String |
validResponderFilename(int responderValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static Hashtable<Integer,Object> indexedCache
public static String makumbaResponderBaseDirectory
static NamedResources cache
Constructor Detail |
---|
public ResponderCacheManager()
Method Detail |
---|
public static ResponderCacheManager getInstance()
static String validResponderFilename(int responderValue)
public void setResponderWorkingDir(HttpServletRequest request)
public void setResponderWorkingDir(Object tempDir, String contextPath)
Responder getResponder(String code, String suffix, String parentSuffix)
code
- the responder codesuffix
- the responder suffixparentSuffix
- the suffix of the parent responder (of the parent form)
public ResponderFactory getFactory()
public void setFactory(ResponderFactory factory)
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |