Class EclipseSerializerRegisteringCopier
java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.copier.object.EclipseSerializerRegisteringCopier
- All Implemented Interfaces:
Closeable,AutoCloseable,org.eclipse.serializer.ObjectCopier,RegisteringObjectCopier
This class utilizes EclipseStore-Serialization and copies objects by serializing and deserializing objects in
memory.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.serializer.ObjectCopier
org.eclipse.serializer.ObjectCopier.Default -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EclipseSerializerRegisteringCopier
-
-
Method Details
-
copy
public <T> T copy(T source) - Specified by:
copyin interfaceorg.eclipse.serializer.ObjectCopier
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.eclipse.serializer.ObjectCopier
-
copy
public <T> T copy(T source, boolean invertRegistering) Here lies a lot of knowledge about EclipseStore internals.Edit with caution!
A storer is created. Then a loader. By then calling
PersistenceStoring.store(Object)the source-object is serialized in memory. Then the created objects are put in a Map which holds the EclipseStore-ObjectId and all the serialized objects. By callingPersistenceRetrieving.get()the serilized objects are deserialized. Then we iterate over the deserlized objects and pair them with the corresponding source-objects through the EclipseStore-ObjectId.- Specified by:
copyin interfaceRegisteringObjectCopier
-