Class ClonerReplicationFactory<T>

  • All Implemented Interfaces:
    org.ikasan.spec.event.ReplicationFactory<T>

    public class ClonerReplicationFactory<T>
    extends java.lang.Object
    implements org.ikasan.spec.event.ReplicationFactory<T>
    Implementation of the replicationFactory contract.
    Author:
    Ikasan Development Team
    • Constructor Summary

      Constructors 
      Constructor Description
      ClonerReplicationFactory​(com.rits.cloning.Cloner cloner)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T replicate​(T object)
      Return a completely independent deep copy instance of the incoming object.
      T shallowReplicate​(T object)
      Return a completely independent shallow copy instance of the incoming object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClonerReplicationFactory

        public ClonerReplicationFactory​(com.rits.cloning.Cloner cloner)
        Constructor
        Parameters:
        cloner -
    • Method Detail

      • replicate

        public T replicate​(T object)
        Return a completely independent deep copy instance of the incoming object. The returned object can be freely mutated without any consequential changes being made to the originating object.
        Specified by:
        replicate in interface org.ikasan.spec.event.ReplicationFactory<T>
        Parameters:
        object - to be replicated
        Returns:
        deep replicated object
      • shallowReplicate

        public T shallowReplicate​(T object)
        Return a completely independent shallow copy instance of the incoming object. The returned object CANNOT be freely mutated without any consequential changes being made to the originating object. Use with care - the returned object may share references with the original object.
        Specified by:
        shallowReplicate in interface org.ikasan.spec.event.ReplicationFactory<T>
        Parameters:
        object - to be replicated
        Returns:
        shallow replicated object