Interface Copier
- All Known Implementing Classes:
AbstractCopier
,IdentityCopier
,JavaSerializationCopier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An object is copied when the cache is configured with storeByValue to guard against
mutations of the key or value.
-
Method Summary
Modifier and TypeMethodDescription<T> @NonNull T
copy
(@NonNull T object, @NonNull ClassLoader classLoader) Returns a deep copy of the object.static Copier
identity()
-
Method Details
-
copy
Returns a deep copy of the object.- Type Parameters:
T
- the type of object being copied- Parameters:
object
- the object to copyclassLoader
- the classloader to instantiate with- Returns:
- a copy of the object
-
identity
- Returns:
- a copy strategy that performs an identity function, for use by store-by-reference
-