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) classSorting by accessed Ascending Comparator(Package privat) classSorting by accessed Descending Comparator(Package privat) classSorting by size Ascending Comparator(Package privat) classSorting by size Descending Comparator -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclear()Removes all elements from the cachebooleancontainsKey(String pathKey) Returns true if cache has an element with pathkeyGets the file infogetCache()Gets a clone of cacheGets sorted pathesvoidPuts pathkey and fileinfo as a record to path cachevoidRemoves the element from the cacheintsize()Returns the number of elements in the cachevoidSorting by last Accessed AscendingvoidSorting by last Accessed DescendingvoidSorting by File Size AscendingvoidSorting 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
-