sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1636833 - in /sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication: event/ packaging/ queue/impl/ queue/impl/jobhandling/ serialization/impl/
Date Wed, 05 Nov 2014 09:22:14 GMT
Author: tommaso
Date: Wed Nov  5 09:22:13 2014
New Revision: 1636833

URL: http://svn.apache.org/r1636833
Log:
SLING-4106 - added some missing javadoc / jsr305 annotations

Modified:
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/event/ReplicationEventType.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/ErrorAwareQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/PriorityPathDistributionStrategy.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/SingleQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/jobhandling/JobHandlingReplicationQueueProvider.java
    sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/serialization/impl/ResourceSharedReplicationPackage.java

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/event/ReplicationEventType.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/event/ReplicationEventType.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/event/ReplicationEventType.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/event/ReplicationEventType.java
Wed Nov  5 09:22:13 2014
@@ -23,13 +23,44 @@ package org.apache.sling.replication.eve
  */
 public enum ReplicationEventType {
 
+    /**
+     * event for package created
+     */
     PACKAGE_CREATED,
+
+    /**
+     * event for package queued
+     */
     PACKAGE_QUEUED,
+
+    /**
+     * event for package replicated
+     */
     PACKAGE_REPLICATED,
+
+    /**
+     * event for package installed
+     */
     PACKAGE_INSTALLED,
+
+    /**
+     * event for package imported
+     */
     PACKAGE_IMPORTED,
+
+    /**
+     * event for agent created
+     */
     AGENT_CREATED,
+
+    /**
+     * event for agent modified
+     */
     AGENT_MODIFIED,
+
+    /**
+     * event for agent deleted
+     */
     AGENT_DELETED
 
 }

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/packaging/SharedReplicationPackage.java
Wed Nov  5 09:22:13 2014
@@ -18,6 +18,8 @@
  */
 package org.apache.sling.replication.packaging;
 
+import javax.annotation.Nonnull;
+
 import aQute.bnd.annotation.ConsumerType;
 
 /**
@@ -30,12 +32,12 @@ public interface SharedReplicationPackag
     /**
      * acquire a reference to this package and increase the reference count.
      */
-    void acquire(String holderName);
+    void acquire(@Nonnull String holderName);
 
     /**
      * release a reference to this package and decrease the reference count.
      * when no more references are hold the package <code>delete</code> method
is called.
      */
-    void release(String holderName);
+    void release(@Nonnull String holderName);
 
 }

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/ErrorAwareQueueDistributionStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/ErrorAwareQueueDistributionStrategy.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/ErrorAwareQueueDistributionStrategy.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/ErrorAwareQueueDistributionStrategy.java
Wed Nov  5 09:22:13 2014
@@ -82,7 +82,7 @@ public class ErrorAwareQueueDistribution
         timeThreshold = PropertiesUtil.toInteger(ctx.getProperties().get(TIME_THRESHOLD),
600000);
     }
 
-    public boolean add(ReplicationPackage replicationPackage, ReplicationQueueProvider queueProvider)
throws ReplicationQueueException {
+    public boolean add(@Nonnull ReplicationPackage replicationPackage, @Nonnull ReplicationQueueProvider
queueProvider) throws ReplicationQueueException {
         boolean added;
         ReplicationQueueItem queueItem = getItem(replicationPackage);
         ReplicationQueue queue = queueProvider.getQueue(DEFAULT_QUEUE_NAME);
@@ -91,6 +91,7 @@ public class ErrorAwareQueueDistribution
         return added;
     }
 
+    @Nonnull
     public List<String> getQueueNames() {
         return Arrays.asList(new String[] { ERROR_QUEUE_NAME, DEFAULT_QUEUE_NAME });
     }

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/PriorityPathDistributionStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/PriorityPathDistributionStrategy.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/PriorityPathDistributionStrategy.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/PriorityPathDistributionStrategy.java
Wed Nov  5 09:22:13 2014
@@ -86,7 +86,7 @@ public class PriorityPathDistributionStr
         return queue;
     }
 
-    public boolean add(ReplicationPackage replicationPackage, ReplicationQueueProvider queueProvider)
throws ReplicationQueueException {
+    public boolean add(@Nonnull ReplicationPackage replicationPackage, @Nonnull ReplicationQueueProvider
queueProvider) throws ReplicationQueueException {
 
         ReplicationQueueItem queueItem = getItem(replicationPackage);
         ReplicationQueue queue = getQueue(queueItem, queueProvider);
@@ -99,6 +99,7 @@ public class PriorityPathDistributionStr
 
 
 
+    @Nonnull
     public List<String> getQueueNames() {
         List<String> paths = Arrays.asList(priorityPaths);
         paths.add(DEFAULT_QUEUE_NAME);

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/SingleQueueDistributionStrategy.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/SingleQueueDistributionStrategy.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/SingleQueueDistributionStrategy.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/SingleQueueDistributionStrategy.java
Wed Nov  5 09:22:13 2014
@@ -46,12 +46,13 @@ public class SingleQueueDistributionStra
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    public boolean add(ReplicationPackage replicationPackage, ReplicationQueueProvider queueProvider)
throws ReplicationQueueException {
+    public boolean add(@Nonnull ReplicationPackage replicationPackage, @Nonnull ReplicationQueueProvider
queueProvider) throws ReplicationQueueException {
         ReplicationQueueItem queueItem = getItem(replicationPackage);
         ReplicationQueue queue = queueProvider.getQueue(DEFAULT_QUEUE_NAME);
         return queue.add(queueItem);
     }
 
+    @Nonnull
     public List<String> getQueueNames() {
         return Arrays.asList(new String[] { DEFAULT_QUEUE_NAME });
     }

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/jobhandling/JobHandlingReplicationQueueProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/jobhandling/JobHandlingReplicationQueueProvider.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/jobhandling/JobHandlingReplicationQueueProvider.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/queue/impl/jobhandling/JobHandlingReplicationQueueProvider.java
Wed Nov  5 09:22:13 2014
@@ -67,7 +67,8 @@ public class JobHandlingReplicationQueue
         this.context = context;
     }
 
-    public ReplicationQueue getQueue(String queueName) throws ReplicationQueueException {
+    @Nonnull
+    public ReplicationQueue getQueue(@Nonnull String queueName) throws ReplicationQueueException
{
         String topic = JobHandlingReplicationQueue.REPLICATION_QUEUE_TOPIC + '/' + name +
"/" + queueName;
         return new JobHandlingReplicationQueue(name, topic, jobManager);
     }

Modified: sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/serialization/impl/ResourceSharedReplicationPackage.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/serialization/impl/ResourceSharedReplicationPackage.java?rev=1636833&r1=1636832&r2=1636833&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/serialization/impl/ResourceSharedReplicationPackage.java
(original)
+++ sling/trunk/contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/serialization/impl/ResourceSharedReplicationPackage.java
Wed Nov  5 09:22:13 2014
@@ -48,7 +48,7 @@ public class ResourceSharedReplicationPa
         this.replicationPackage = replicationPackage;
     }
 
-    public void acquire(String holderName) {
+    public void acquire(@Nonnull String holderName) {
         if (holderName == null || holderName.length() == 0) {
             throw new IllegalArgumentException("holder name cannot be null or empty");
         }
@@ -60,7 +60,7 @@ public class ResourceSharedReplicationPa
         }
     }
 
-    public void release(String holderName) {
+    public void release(@Nonnull String holderName) {
 
         if (holderName == null || holderName.length() == 0) {
             throw new IllegalArgumentException("holder name cannot be null or empty");



Mime
View raw message