Package com.booksaw.betterTeams.util
Class Cache.Builder<K,V>
java.lang.Object
com.booksaw.betterTeams.util.Cache.Builder<K,V>
A builder for creating Cache instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new Cache instance.expireAfterAccess
(@NotNull Duration duration) Sets the expiration time after accessing an entry.expireAfterWrite
(@NotNull Duration duration) Sets the expiration time after writing an entry.initialCapacity
(int initialCapacity) Sets the initial capacity of the cache.maximumSize
(int maximumSize) Sets the maximum size of the cache.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expireAfterWrite
Sets the expiration time after writing an entry. -
expireAfterAccess
Sets the expiration time after accessing an entry. -
maximumSize
Sets the maximum size of the cache. -
initialCapacity
Sets the initial capacity of the cache. -
build
Builds a new Cache instance.
-