Interface Copier
- All Known Implementing Classes:
AbstractCopier,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> Tcopy(T object, ClassLoader classLoader) Returns a deep copy of the object.static Copieridentity()Return a copy strategy that performs an identity function, for use by store-by-reference.
-
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
Return a copy strategy that performs an identity function, for use by store-by-reference.
-