|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--jason.service.http1_0.cache.Cache
Cache for HTTP Request
Thread
Field Summary | |
static int |
FIFO
|
static int |
FREQUENCY
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Cache(int capacity,
int refresh,
int type)
|
Method Summary | |
void |
addDoc(byte[] doc,
java.lang.String path)
Add an item in the cache |
void |
addDoc(jason.service.http1_0.cache.CacheItem item)
|
byte[] |
getDoc(java.lang.String path)
|
static java.lang.StringBuffer |
loadDoc(java.io.File doc)
Load a page |
void |
run()
|
void |
setCapacity(int capacity)
|
void |
setRefresh(int refresh)
|
void |
setType(int type)
|
void |
stat()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int FREQUENCY
public static final int FIFO
Constructor Detail |
public Cache(int capacity, int refresh, int type)
Method Detail |
public void setCapacity(int capacity)
public void setType(int type)
type
- cache type (FIFO or FREQUENCY)public void setRefresh(int refresh)
public void addDoc(byte[] doc, java.lang.String path)
public void addDoc(jason.service.http1_0.cache.CacheItem item)
public byte[] getDoc(java.lang.String path)
public void stat()
public static java.lang.StringBuffer loadDoc(java.io.File doc) throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |