Package de.dlr.proseo.storagemgr.cache
Klasse MapCache
java.lang.Object
de.dlr.proseo.storagemgr.cache.MapCache
Map wrapper for file cache with path as key and last accessed and file size
as value
- Autor:
- Denys Chaykovskiy
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibung(Package privat) class
Sorting by accessed Ascending Comparator(Package privat) class
Sorting by accessed Descending Comparator(Package privat) class
Sorting by size Ascending Comparator(Package privat) class
Sorting by size Descending Comparator -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clear()
Removes all elements from the cacheboolean
containsKey
(String pathKey) Returns true if cache has an element with pathkeyGets the file infogetCache()
Gets a clone of cacheGets sorted pathesvoid
Puts pathkey and fileinfo as a record to path cachevoid
Removes the element from the cacheint
size()
Returns the number of elements in the cachevoid
Sorting by last Accessed Ascendingvoid
Sorting by last Accessed Descendingvoid
Sorting by File Size Ascendingvoid
Sorting by File Size Descending
-
Konstruktordetails
-
MapCache
public MapCache()
-
-
Methodendetails
-
getSortedPathes
Gets sorted pathes- Gibt zurück:
- list of sorted pathes
-
getCache
Gets a clone of cache- Gibt zurück:
- cloned cache
-
put
Puts pathkey and fileinfo as a record to path cache- Parameter:
pathKey
- path of the filefileInfo
- File info as a value
-
get
Gets the file info- Parameter:
pathKey
- path of the file- Gibt zurück:
- file info
-
remove
Removes the element from the cache- Parameter:
pathKey
- path of the file
-
clear
public void clear()Removes all elements from the cache -
containsKey
Returns true if cache has an element with pathkey- Parameter:
pathKey
- Path of the file- Gibt zurück:
- true if cache has an element
-
size
public int size()Returns the number of elements in the cache- Gibt zurück:
- size of the cache
-
sortByFileSizeAsc
public void sortByFileSizeAsc()Sorting by File Size Ascending -
sortByFileSizeDesc
public void sortByFileSizeDesc()Sorting by File Size Descending -
sortByAccessedAsc
public void sortByAccessedAsc()Sorting by last Accessed Ascending -
sortByAccessedDesc
public void sortByAccessedDesc()Sorting by last Accessed Descending
-