Class ReplicationActions


  • @ProviderType
    public class ReplicationActions
    extends Object
    Replication utility functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> activate​(com.day.cq.replication.Replicator replicator, String path)
      Activate a single node.
      static CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAll​(com.day.cq.replication.Replicator replicator)
      Activate all nodes using default replicators
      static CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAllWithOptions​(com.day.cq.replication.Replicator replicator, com.day.cq.replication.ReplicationOptions options)
      Activate all nodes using provided options NOTE: If using large batch publishing it is highly recommended to set synchronous to true on the replication options
      static CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAllWithRoundRobin​(com.day.cq.replication.Replicator replicator, com.day.cq.replication.ReplicationOptions... options)
      Activate all nodes using provided options NOTE: If using large batch publishing it is highly recommended to set synchronous to true on the replication options
      static CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> activateWithOptions​(com.day.cq.replication.Replicator replicator, String path, com.day.cq.replication.ReplicationOptions options)
      Activate a single node using provided replication options.
      static CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> deactivate​(com.day.cq.replication.Replicator replicator, String path)
      Deactivate a single node.
      static CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> deactivateAll​(com.day.cq.replication.Replicator replicator)
      Deactivate all nodes using default replicators
      static CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> deactivateAllWithOptions​(com.day.cq.replication.Replicator replicator, com.day.cq.replication.ReplicationOptions options)
      Deactivate all nodes using provided options
      static CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> deactivateWithOptions​(com.day.cq.replication.Replicator replicator, String path, com.day.cq.replication.ReplicationOptions options)
      Deactivate a single node using provided replication options.
    • Method Detail

      • activateAll

        public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAll​(com.day.cq.replication.Replicator replicator)
        Activate all nodes using default replicators
        Returns:
      • activateAllWithOptions

        public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAllWithOptions​(com.day.cq.replication.Replicator replicator,
                                                                                                                                  com.day.cq.replication.ReplicationOptions options)
        Activate all nodes using provided options NOTE: If using large batch publishing it is highly recommended to set synchronous to true on the replication options
        Parameters:
        options -
        Returns:
      • activateAllWithRoundRobin

        public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> activateAllWithRoundRobin​(com.day.cq.replication.Replicator replicator,
                                                                                                                                     com.day.cq.replication.ReplicationOptions... options)
        Activate all nodes using provided options NOTE: If using large batch publishing it is highly recommended to set synchronous to true on the replication options
        Parameters:
        options -
        Returns:
      • deactivateAll

        public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> deactivateAll​(com.day.cq.replication.Replicator replicator)
        Deactivate all nodes using default replicators
        Returns:
      • deactivateAllWithOptions

        public static final CheckedBiConsumer<org.apache.sling.api.resource.ResourceResolver,​String> deactivateAllWithOptions​(com.day.cq.replication.Replicator replicator,
                                                                                                                                    com.day.cq.replication.ReplicationOptions options)
        Deactivate all nodes using provided options
        Parameters:
        options -
        Returns:
      • activate

        public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> activate​(com.day.cq.replication.Replicator replicator,
                                                                                                     String path)
        Activate a single node.
        Parameters:
        path -
        Returns:
      • activateWithOptions

        public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> activateWithOptions​(com.day.cq.replication.Replicator replicator,
                                                                                                                String path,
                                                                                                                com.day.cq.replication.ReplicationOptions options)
        Activate a single node using provided replication options.
        Parameters:
        path -
        options -
        Returns:
      • deactivate

        public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> deactivate​(com.day.cq.replication.Replicator replicator,
                                                                                                       String path)
        Deactivate a single node.
        Parameters:
        path -
        Returns:
      • deactivateWithOptions

        public static final CheckedConsumer<org.apache.sling.api.resource.ResourceResolver> deactivateWithOptions​(com.day.cq.replication.Replicator replicator,
                                                                                                                  String path,
                                                                                                                  com.day.cq.replication.ReplicationOptions options)
        Deactivate a single node using provided replication options.
        Parameters:
        path -
        options -
        Returns: