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.
@FunctionalInterface public interface Copier
An object is copied when the cache is configured with storeByValue to guard against mutations of the key or value.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <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 Detail
-
copy
<T> T copy(T object, ClassLoader classLoader)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
static Copier identity()
Return a copy strategy that performs an identity function, for use by store-by-reference.
-
-