Package io.github.emcw.caching
Class BaseCache<V>
java.lang.Object
io.github.emcw.caching.BaseCache<V>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBaseCache
(CacheOptions cacheOptions) Abstract class acting as a parent to other cache classes and holds a reference to a Caffeine cache.
It provides the fundamental methods (get, single & all) that children automatically inherit. -
Method Summary
-
Field Details
-
cache
-
options
-
updater
-
-
Constructor Details
-
BaseCache
Abstract class acting as a parent to other cache classes and holds a reference to a Caffeine cache.
It provides the fundamental methods (get, single & all) that children automatically inherit.- Parameters:
cacheOptions
- The options that this cache will be setup with.- See Also:
-
-
Method Details
-
build
protected void build() -
updateIf
-
get
-
single
- Throws:
MissingEntryException
-
all
-
has
-
clear
public void clear() -
empty
public boolean empty() -
put
-
putAll
-
tryExpire
public void tryExpire()
-