Package com.killcoding.cache
Class DiskCache
java.lang.Object
com.killcoding.cache.AbsCacheApi
com.killcoding.cache.DiskCache
This cache class is save to hard disk
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Fileprivate ExecutorServiceprivate booleanprivate static final Loggerprivate final longFields inherited from class com.killcoding.cache.AbsCacheApi
stored, TIMER -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
log
-
PID
-
CACHE_FILE
-
CACHE_LIFE
-
cacheTmpdir
-
isStartRemoveExpiredThread
-
executor
-
-
Constructor Details
-
DiskCache
public DiskCache()New a DiskCache object -
DiskCache
New a DiskCache object- Parameters:
stored- - 'true' is force write cache
-
-
Method Details
-
shutdown
Shutdown cahee thread- Specified by:
shutdownin classAbsCacheApi
-
startRemoveExpiredThread
Start remove expired thread -
included
- Specified by:
includedin classAbsCacheApi
-
getNames
- Specified by:
getNamesin classAbsCacheApi
-
removeAll
void removeAll()- Specified by:
removeAllin classAbsCacheApi
-
remove
- Specified by:
removein classAbsCacheApi
-
get
- Specified by:
getin classAbsCacheApi
-
set
- Specified by:
setin classAbsCacheApi
-