Interface Agent

    • Method Detail

      • getId

        java.lang.String getId()
        Returns the id of the agent. the id is unique among the agents
        Returns:
        the id of the agent
      • isEnabled

        boolean isEnabled()
        checks if agent is active
        Returns:
        true if the agent is active
      • isValid

        boolean isValid()
        checks if agent is valid
        Returns:
        true if the agent is correctly configured
      • checkValid

        void checkValid()
        Checks if the agent is valid and throws an exception if not. the message of the exception can be used as hint to the user.
        Throws:
        java.lang.IllegalArgumentException - if the agent is not valid.
      • getConfiguration

        AgentConfig getConfiguration()
        Get the configuration.
        Returns:
        configuration
      • getLog

        ReplicationLog getLog()
        Returns the replication log of this agent
        Returns:
        the replication log.
      • buildContent

        ReplicationContent buildContent​(Session session,
                                        ReplicationAction action,
                                        java.util.Map<java.lang.String,​java.lang.Object> parameters)
                                 throws ReplicationException
        Builds the content for the respective action using the configured content builder. The returned content is acquired by this agent.
        Parameters:
        session - jcr session
        action - action
        parameters - additional parameters to be supplied to the underlying ContentBuilder
        Returns:
        the content or null
        Throws:
        ReplicationException - if an error occurs
      • getQueue

        ReplicationQueue getQueue()
        Returns the replication queue.
        Returns:
        the replication queue or null if the agents is not active or valid.
      • isCacheInvalidator

        boolean isCacheInvalidator()
        Indicates that this agent is used as cache invalidator. For example as dispatcher flush agent.
        Returns:
        true if this agent is used as a cache invalidator.
      • setNextPollTimeline

        void setNextPollTimeline​(java.util.Calendar time)
        Defines the timeline to be used for the next reverse replication poll.
        Parameters:
        time - the time
      • getLastPollTimeline

        java.util.Calendar getLastPollTimeline()
        Returns the timeline used for the last reverse replication.
        Returns:
        the timeline or null
      • isInMaintenanceMode

        boolean isInMaintenanceMode()
        Checks if the agent is in maintenance mode
        Returns:
        true if this agent is in maintenance mode
      • supportsBulkContentBuilding

        boolean supportsBulkContentBuilding()
        Checks if the agent can build content for multiple paths/resources.
        Returns:
        true if this agent is capable of building bulk content (for multiple paths), false otherwise.
      • buildBulkContent

        ReplicationContent buildBulkContent​(Session session,
                                            CompositeReplicationAction action,
                                            java.util.Map<java.lang.String,​java.lang.Object> parameters)
                                     throws ReplicationException
        Builds bulk content for the respective composite action using the configured content builder. The returned content is acquired by this agent.
        Parameters:
        session - jcr session
        action - composite action
        parameters - additional parameters to be supplied to the underlying ContentBuilder
        Returns:
        the bulk content if #supportsBulkContentBuilding == true or null
        Throws:
        ReplicationException - if an error occurs