|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.application.areca.cache.ArchiveDataMap
public class ArchiveDataMap
Sorted cache of data for a given FileSystemArchiveMedium.
These data are indexed by File.
It counts the usage of each file and build an eviction strategy upon these statistics.
It checks that the underlying file key hasn't been modified since the caching of the data and refreshes its content if needed.
This class is not synchronized. The caller must manage concurrent accesses.
Constructor Summary | |
---|---|
ArchiveDataMap()
|
Method Summary | |
---|---|
void |
clear()
Clears the map's content but keeps the usage count. |
double |
computeScore()
Computes a score used by the eviction strategy |
java.lang.Object |
get(java.io.File key)
|
boolean |
isEmpty()
|
java.util.Iterator |
keyIterator()
|
void |
put(java.io.File key,
java.lang.Object data,
long approximateSize)
|
protected void |
registerUsage()
Registers that the cache has been used |
java.lang.Object |
remove(java.io.File key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArchiveDataMap()
Method Detail |
---|
public java.lang.Object get(java.io.File key)
public double computeScore()
public void put(java.io.File key, java.lang.Object data, long approximateSize)
public java.lang.Object remove(java.io.File key)
public java.util.Iterator keyIterator()
public void clear()
public boolean isEmpty()
protected void registerUsage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |