You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:28:54 UTC

[sling-org-apache-sling-distribution-api] 20/41: SLING-4153: changing events to be controlled by agent + some name changes for settings

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.distribution.api-0.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-api.git

commit 446a23a68a5b386aa92e0156821e82e9479211a6
Author: Marius Petria <mp...@apache.org>
AuthorDate: Fri Dec 5 13:24:00 2014 +0000

    SLING-4153: changing events to be controlled by agent + some name changes for settings
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/distribution/api@1643266 13f79535-47bb-0310-9956-ffa450edef68
---
 .../distribution/event/DistributionEventType.java  | 16 ++----
 .../DistributionQueueDispatchingStrategy.java      | 60 ----------------------
 2 files changed, 3 insertions(+), 73 deletions(-)

diff --git a/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java b/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
index 3042c94..3955af4 100644
--- a/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
+++ b/src/main/java/org/apache/sling/distribution/event/DistributionEventType.java
@@ -26,27 +26,17 @@ public enum DistributionEventType {
     /**
      * event for package created
      */
-    PACKAGE_CREATED,
+    AGENT_PACKAGE_CREATED,
 
     /**
      * event for package queued
      */
-    PACKAGE_QUEUED,
+    AGENT_PACKAGE_QUEUED,
 
     /**
      * event for package distributed
      */
-    PACKAGE_DISTRIBUTED,
-
-    /**
-     * event for package installed
-     */
-    PACKAGE_INSTALLED,
-
-    /**
-     * event for package imported
-     */
-    PACKAGE_IMPORTED,
+    AGENT_PACKAGE_DISTRIBUTED,
 
     /**
      * event for agent created
diff --git a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java b/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java
deleted file mode 100644
index 4f58255..0000000
--- a/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.sling.distribution.queue;
-
-import javax.annotation.Nonnull;
-import java.util.List;
-
-import aQute.bnd.annotation.ConsumerType;
-import org.apache.sling.distribution.packaging.DistributionPackage;
-
-/**
- * a {@link DistributionQueueDispatchingStrategy} implements an algorithm for dispatching
- * {@link org.apache.sling.distribution.packaging.DistributionPackage}s among the available queues.
- * <p/>
- * Usually a {@link org.apache.sling.distribution.packaging.DistributionPackage} will be dispatched to a single {@link org.apache.sling.distribution.queue.DistributionQueue}
- * but it would also be possible to dispatch the same package to multiple queues, resulting in obtaining multiple states
- * (one for each queue) for a certain package.
- */
-@ConsumerType
-public interface DistributionQueueDispatchingStrategy {
-    String DEFAULT_QUEUE_NAME = "default";
-
-    /**
-     * synchronously distribute a {@link org.apache.sling.distribution.packaging.DistributionPackage}
-     * to one or more {@link DistributionQueue}s provided by the given {@link DistributionQueueProvider}
-     *
-     * @param distributionPackage a {@link org.apache.sling.distribution.packaging.DistributionPackage} to distribute
-     * @param queueProvider       the {@link DistributionQueueProvider} used to provide the queues to be used for the given package
-     * @return an {@link java.lang.Iterable} of {@link org.apache.sling.distribution.queue.DistributionQueueItemState}s representing
-     * the states of the {@link org.apache.sling.distribution.queue.DistributionQueueItem}s added to one or more {@link org.apache.sling.distribution.queue.DistributionQueue}s
-     * @throws DistributionQueueException if any internal error happens during distribution
-     */
-    Iterable<DistributionQueueItemState> add(@Nonnull DistributionPackage distributionPackage, @Nonnull DistributionQueueProvider queueProvider) throws DistributionQueueException;
-
-
-    /**
-     * Returns the queue names available for this strategy.
-     *
-     * @return a list of queue names
-     */
-    @Nonnull
-    List<String> getQueueNames();
-
-}

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.