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

public class EclipseSerializerRegisteringCopier extends Object implements RegisteringObjectCopier
This class utilizes EclipseStore-Serialization and copies objects by serializing and deserializing objects in memory.
  • Constructor Details

    • EclipseSerializerRegisteringCopier

      public EclipseSerializerRegisteringCopier(WorkingCopyRegistry registry)
  • Method Details

    • copy

      public <T> T copy(T source)
      Specified by:
      copy in interface org.eclipse.serializer.ObjectCopier
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.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 calling PersistenceRetrieving.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:
      copy in interface RegisteringObjectCopier