|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Caching.CacheBuffer
This class is used to create and manage a buffer of information about
the pages which we have cached
There is no constructor for this class because you shoudn't ever need to
make a NEW instance of this class. This class is designed to make an instance
of itself only once when using the getInstance command (see the method for more info)
Whenever you need to use this object you need to make an instance of it as follows:
CacheBuffer cb = CacheBuffer.getInstance();
Field Summary | |
Caching.CacheTreeNode |
Tree
|
Method Summary | |
boolean |
addToBuffer(BufferEntry entry)
Add an entry to the cache buffer |
void |
addURLToBuffer(java.lang.String URL,
HTTPClient.HTTPResponse rsp)
Add a URL to the buffer. |
boolean |
deleteBufferEntry(BufferEntry entry)
Delete an entry from the cache buffer |
boolean |
deleteBufferEntry(java.lang.String URL)
Delete the URL from the Cache Buffer. |
BufferEntry |
getBufferEntry(java.lang.String URL)
Get the buffer structure associated with a URL. |
java.util.Date |
getExpiration(java.lang.String URL)
Get the expired field of a certain URL. |
static CacheBuffer |
getInstance()
Get an instance of this buffer. |
java.util.Date |
getLastModified(java.lang.String URL)
Get the date last modified field of a certain URL. |
java.util.Date |
getRetrieved(java.lang.String URL)
Get the date retrieved field of a certain URL. |
java.util.Hashtable |
giveBuffer()
Give the contents of the buffer |
boolean |
isInBuffer(BufferEntry entry)
See if an entry is in the cache buffer |
void |
printBuffer()
Print out the contents of the buffer |
boolean |
updateBuffer(BufferEntry old,
BufferEntry new_entry)
Update an entry in the cache buffer |
boolean |
updateBuffer(java.lang.String url_to_update,
BufferEntry new_entry)
Update an entry in the cache Buffer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Caching.CacheTreeNode Tree
Method Detail |
public static CacheBuffer getInstance()
public void printBuffer()
public void addURLToBuffer(java.lang.String URL, HTTPClient.HTTPResponse rsp)
public java.util.Hashtable giveBuffer()
public boolean isInBuffer(BufferEntry entry)
public boolean updateBuffer(java.lang.String url_to_update, BufferEntry new_entry)
public boolean updateBuffer(BufferEntry old, BufferEntry new_entry)
public boolean addToBuffer(BufferEntry entry)
public boolean deleteBufferEntry(BufferEntry entry)
public BufferEntry getBufferEntry(java.lang.String URL)
public boolean deleteBufferEntry(java.lang.String URL)
public java.util.Date getExpiration(java.lang.String URL)
public java.util.Date getRetrieved(java.lang.String URL)
public java.util.Date getLastModified(java.lang.String URL)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |