Class EclipseSerializerRegisteringCopier
java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.copier.registering.EclipseSerializerRegisteringCopier
- All Implemented Interfaces:
AutoCloseable
This class utilizes EclipseStore-Serialization and copies objects by serializing and deserializing objects in
memory.
-
Constructor Summary
ConstructorsConstructorDescriptionEclipseSerializerRegisteringCopier(SupportedChecker supportedChecker, RegisteringWorkingCopyAndOriginal register, Supplier<org.eclipse.serializer.persistence.types.PersistenceManager<org.eclipse.serializer.persistence.binary.types.Binary>> persistenceManagerSupplier, jakarta.validation.Validator validator) -
Method Summary
-
Constructor Details
-
EclipseSerializerRegisteringCopier
public EclipseSerializerRegisteringCopier(SupportedChecker supportedChecker, RegisteringWorkingCopyAndOriginal register, Supplier<org.eclipse.serializer.persistence.types.PersistenceManager<org.eclipse.serializer.persistence.binary.types.Binary>> persistenceManagerSupplier, jakarta.validation.Validator validator)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
copy
public <T> T copy(T source) 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 serialized objects are deserialized. Then we iterate over the deserialized objects and pair them with the corresponding source-objects through the EclipseStore-ObjectId.
-