Class EclipseSerializerRegisteringCopier

java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.copier.registering.EclipseSerializerRegisteringCopier
All Implemented Interfaces:
AutoCloseable

public class EclipseSerializerRegisteringCopier extends Object implements AutoCloseable
This class utilizes EclipseStore-Serialization and copies objects by serializing and deserializing objects in memory.
  • 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:
      close in interface AutoCloseable
    • 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 calling PersistenceRetrieving.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.