Package dev.voidframework.cache.engine
Class AbstractCacheEngine
java.lang.Object
dev.voidframework.cache.engine.AbstractCacheEngine
- All Implemented Interfaces:
CacheEngine
This abstract implementation provides the necessary tools for the
various implementations of
CacheEngine to work smoothly.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordWrapper: cached element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionunwrap(AbstractCacheEngine.CachedElement cachedElement) Unwraps an object fromCachedElement.Wraps an object intoCachedElement.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.voidframework.cache.engine.CacheEngine
get, remove, set
-
Constructor Details
-
AbstractCacheEngine
public AbstractCacheEngine()Build a new instance.
-
-
Method Details
-
wrap
Wraps an object intoCachedElement.- Parameters:
obj- Object to wrap- Returns:
- Wrapped object
-
unwrap
Unwraps an object fromCachedElement.- Parameters:
cachedElement- wrapped object- Returns:
- Unwrapped object
-