Class ReplicationAction

    • Field Detail

      • PROPERTY_MODIFICATION_DATE

        public static final String PROPERTY_MODIFICATION_DATE
        The OSGi event property containing the modification date
        See Also:
        Constant Field Values
      • PROPERTY_USER_ID

        public static final String PROPERTY_USER_ID
        The OSGi event property containing the user id
        See Also:
        Constant Field Values
      • PROPERTY_PATHS

        public static final String PROPERTY_PATHS
        The OSGi event property containing the paths
        Since:
        5.5
        See Also:
        Constant Field Values
      • PROPERTY_TYPE

        public static final String PROPERTY_TYPE
        The OSGi event property containing replication action
        See Also:
        Constant Field Values
      • PROPERTY_REVISION

        public static final String PROPERTY_REVISION
        The OSGi event property containing the replicated revision (optional)
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        public ReplicationActionType getType()
        Returns the action type
        Returns:
        replication action type
      • getPath

        public String getPath()
        Returns the path
        Returns:
        path
      • getPaths

        public String[] getPaths()
        Returns the replication paths. Currently the array may only contain more than 1 elements for a delete replication. in that case, the paths are the ones of the deleted aggregates (content nodes).
        Returns:
        the paths
        Since:
        5.5
      • getRevision

        public String getRevision()
        Returns the revision
        Returns:
        the revision
      • getTime

        public long getTime()
        Returns the replication time
        Returns:
        the replication time
      • getUserId

        public String getUserId()
        Returns the user id.
        Returns:
        the user id.
      • getConfig

        public AgentConfig getConfig()
        Return the agent config.
        Returns:
        agent config
      • setConfig

        public void setConfig​(AgentConfig config)
        Set the agent config.
        Parameters:
        config - agent config
      • getLog

        public ReplicationLog getLog()
        Return the replication log.
        Returns:
        replication log
      • setLog

        public void setLog​(ReplicationLog log)
        Set the replication log.
        Parameters:
        log - the log
      • fromEvent

        public static ReplicationAction fromEvent​(Event evt)
        Convert an OSGi event to a replication event.
        Parameters:
        evt - The OSGi event
        Returns:
        The replication event if the OSGi event contained a replication event. Otherwise null is returned.
      • createEventProperties

        public Map<String,​Object> createEventProperties​(boolean distribute)
        Create the OSGi event properties.
        Parameters:
        distribute - Whether this event should be distributed across the cluster.
        Returns:
        OSGi event properties
        Since:
        5.18.0
      • toEvent

        public Event toEvent()
        Create an OSGi event out of the replication event.
        Returns:
        A new OSGi event.
      • toEvent

        public Event toEvent​(boolean distribute)
        Create an OSGi event out of the replication event.
        Parameters:
        distribute - if true a distributed event is created
        Returns:
        A new OSGi event.