sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1650494 - in /sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl: ForwardDistributionAgentFactory.java ReverseDistributionAgentFactory.java SyncDistributionAgentFactory.java
Date Fri, 09 Jan 2015 10:34:01 GMT
Author: tommaso
Date: Fri Jan  9 10:34:01 2015
New Revision: 1650494

URL: http://svn.apache.org/r1650494
Log:
SLING-4290 - set cardinality defaults to 100

Modified:
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ReverseDistributionAgentFactory.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java?rev=1650494&r1=1650493&r2=1650494&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ForwardDistributionAgentFactory.java
Fri Jan  9 10:34:01 2015
@@ -82,7 +82,7 @@ public class ForwardDistributionAgentFac
     /**
      * endpoints property
      */
-    @Property(cardinality = -1)
+    @Property(cardinality = 100)
     public static final String IMPORTER_ENDPOINTS = "packageImporter.endpoints";
 
     @Property(label = "Use multiple queues", boolValue = false)

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ReverseDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ReverseDistributionAgentFactory.java?rev=1650494&r1=1650493&r2=1650494&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ReverseDistributionAgentFactory.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/ReverseDistributionAgentFactory.java
Fri Jan  9 10:34:01 2015
@@ -80,10 +80,9 @@ public class ReverseDistributionAgentFac
     /**
      * endpoints property
      */
-    @Property(cardinality = -1)
+    @Property(cardinality = 100)
     public static final String EXPORTER_ENDPOINTS = "packageExporter.endpoints";
 
-
     /**
      * no. of items to poll property
      */

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java?rev=1650494&r1=1650493&r2=1650494&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java
Fri Jan  9 10:34:01 2015
@@ -82,13 +82,13 @@ public class SyncDistributionAgentFactor
     /**
      * endpoints property
      */
-    @Property(cardinality = -1)
+    @Property(cardinality = 100)
     public static final String EXPORTER_ENDPOINTS = "packageExporter.endpoints";
 
     /**
      * endpoints property
      */
-    @Property(cardinality = -1)
+    @Property(cardinality = 100)
     public static final String IMPORTER_ENDPOINTS = "packageImporter.endpoints";
 
 
@@ -154,14 +154,17 @@ public class SyncDistributionAgentFactor
         String serviceName = PropertiesUtil.toString(config.get(SERVICE_NAME), null);
 
 
-        String[] exporterEndpoints = PropertiesUtil.toStringArray(config.get(EXPORTER_ENDPOINTS),
new String[0]);
+        Object exporterEndpointsValue = config.get(EXPORTER_ENDPOINTS);
+        Object importerEndpointsValue = config.get(IMPORTER_ENDPOINTS);
 
+        String[] exporterEndpoints = PropertiesUtil.toStringArray(exporterEndpointsValue,
new String[0]);
+        Map<String, String> importerEndpointsMap = SettingsUtils.toUriMap(importerEndpointsValue);
 
-        DistributionQueueDispatchingStrategy dispatchingStrategy = null;
-        DistributionPackageImporter packageImporter = null;
-        Map<String, String> importerEndpointsMap = SettingsUtils.toUriMap(config.get(IMPORTER_ENDPOINTS));
         boolean useMultipleQueues = PropertiesUtil.toBoolean(config.get(USE_MULTIPLE_QUEUES),
false);
 
+        DistributionQueueDispatchingStrategy dispatchingStrategy;
+        DistributionPackageImporter packageImporter;
+
         if (useMultipleQueues) {
             java.util.Set<String> var = importerEndpointsMap.keySet();
             String[] queueNames = var.toArray(new String[var.size()]);
@@ -172,7 +175,6 @@ public class SyncDistributionAgentFactor
             packageImporter = new RemoteDistributionPackageImporter(transportSecretProvider,
importerEndpointsMap, TransportEndpointStrategyType.All);
         }
 
-
         DistributionPackageExporter packageExporter = new RemoteDistributionPackageExporter(packageBuilder,
transportSecretProvider, exporterEndpoints, TransportEndpointStrategyType.All, 1);
         DistributionQueueProvider queueProvider =  new JobHandlingDistributionQueueProvider(agentName,
jobManager, context);
 



Mime
View raw message