This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.jobs-1.0.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jobs.git
commit 8e498cc9e19b6f49d6a2f28f77248b613fa1d406 Author: Ian Boston <[email protected]> AuthorDate: Mon Oct 3 16:17:56 2016 +0000 SLING-5645 added provider types to apis where applicable git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/mom/jobs/core@1763185 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 6 ++++++ src/main/java/org/apache/sling/jobs/Job.java | 2 ++ src/main/java/org/apache/sling/jobs/JobBuilder.java | 4 ++++ src/main/java/org/apache/sling/jobs/JobCallback.java | 4 ++++ src/main/java/org/apache/sling/jobs/JobConsumer.java | 4 ++++ src/main/java/org/apache/sling/jobs/JobController.java | 4 ++++ src/main/java/org/apache/sling/jobs/JobManager.java | 3 +++ src/main/java/org/apache/sling/jobs/JobTypeValve.java | 3 +++ src/main/java/org/apache/sling/jobs/JobUpdate.java | 2 ++ src/main/java/org/apache/sling/jobs/JobUpdateBuilder.java | 3 +++ src/main/java/org/apache/sling/jobs/JobUpdateListener.java | 3 +++ src/main/java/org/apache/sling/jobs/impl/spi/JobStarter.java | 2 ++ src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java | 2 ++ src/main/java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java | 3 +++ 14 files changed, 45 insertions(+) diff --git a/pom.xml b/pom.xml index 2343918..08a38ad 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,12 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>org.osgi</groupId> + <artifactId>osgi.annotation</artifactId> + <version>6.0.1</version> + <scope>provided</scope> + </dependency> + <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>jsr305</artifactId> <version>2.0.1</version> diff --git a/src/main/java/org/apache/sling/jobs/Job.java b/src/main/java/org/apache/sling/jobs/Job.java index 819a7a2..e2dd33d 100644 --- a/src/main/java/org/apache/sling/jobs/Job.java +++ b/src/main/java/org/apache/sling/jobs/Job.java @@ -21,6 +21,7 @@ package org.apache.sling.jobs; import com.google.common.collect.ImmutableSet; import org.apache.sling.mom.TopicManager; +import org.osgi.annotation.versioning.ProviderType; import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; @@ -34,6 +35,7 @@ import java.util.Set; * Largely based on org.apache.sling.event.Job. * A Job contains the complete state of the Job as known in the current JVM. */ +@ProviderType public interface Job { diff --git a/src/main/java/org/apache/sling/jobs/JobBuilder.java b/src/main/java/org/apache/sling/jobs/JobBuilder.java index b69934d..cabfd4f 100644 --- a/src/main/java/org/apache/sling/jobs/JobBuilder.java +++ b/src/main/java/org/apache/sling/jobs/JobBuilder.java @@ -18,12 +18,16 @@ */ package org.apache.sling.jobs; + +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; import java.util.Map; /** * A JobBuilder allows users of the JobSystem to modify the properties of the Job and submit it for processing. */ +@ProviderType public interface JobBuilder { /** diff --git a/src/main/java/org/apache/sling/jobs/JobCallback.java b/src/main/java/org/apache/sling/jobs/JobCallback.java index bbadc6b..4fc84e3 100644 --- a/src/main/java/org/apache/sling/jobs/JobCallback.java +++ b/src/main/java/org/apache/sling/jobs/JobCallback.java @@ -19,10 +19,14 @@ package org.apache.sling.jobs; + +import org.osgi.annotation.versioning.ProviderType; + /** * When a job is complete, the callback gets called. * This interface is implemented by the Jobs Implementation and passed into a JobsConsumer. */ +@ProviderType public interface JobCallback { /** diff --git a/src/main/java/org/apache/sling/jobs/JobConsumer.java b/src/main/java/org/apache/sling/jobs/JobConsumer.java index dbf6703..af808db 100644 --- a/src/main/java/org/apache/sling/jobs/JobConsumer.java +++ b/src/main/java/org/apache/sling/jobs/JobConsumer.java @@ -18,6 +18,9 @@ */ package org.apache.sling.jobs; + +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; /** @@ -30,6 +33,7 @@ import javax.annotation.Nonnull; * the job queue is to be discouraged, as it may require too much from the JobConsumer implementation to guarantee the contract * in this interface. */ +@ProviderType public interface JobConsumer { String JOB_TYPES = "job.types"; diff --git a/src/main/java/org/apache/sling/jobs/JobController.java b/src/main/java/org/apache/sling/jobs/JobController.java index e038b52..153ad62 100644 --- a/src/main/java/org/apache/sling/jobs/JobController.java +++ b/src/main/java/org/apache/sling/jobs/JobController.java @@ -19,6 +19,9 @@ package org.apache.sling.jobs; + +import org.osgi.annotation.versioning.ProviderType; + /** * A job controller provides a mechanism by which a running job can be sent control messages. * Jobs when they start should register a JobController implementation with the JobManager so that @@ -26,6 +29,7 @@ package org.apache.sling.jobs; * message to the Job, bypassing the manager, although this TopicListener will need to filter * for all messages associated with the Job. */ +@ProviderType public interface JobController { diff --git a/src/main/java/org/apache/sling/jobs/JobManager.java b/src/main/java/org/apache/sling/jobs/JobManager.java index 5dc4c3c..e23db30 100644 --- a/src/main/java/org/apache/sling/jobs/JobManager.java +++ b/src/main/java/org/apache/sling/jobs/JobManager.java @@ -18,6 +18,8 @@ */ package org.apache.sling.jobs; +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; @@ -26,6 +28,7 @@ import java.util.Map; /** * Based on org.apache.sling.event.job.JobManager but trimmed down and adjusted to deal with distributed job queues. */ +@ProviderType public interface JobManager { diff --git a/src/main/java/org/apache/sling/jobs/JobTypeValve.java b/src/main/java/org/apache/sling/jobs/JobTypeValve.java index 20f6782..2b75599 100644 --- a/src/main/java/org/apache/sling/jobs/JobTypeValve.java +++ b/src/main/java/org/apache/sling/jobs/JobTypeValve.java @@ -18,6 +18,8 @@ */ package org.apache.sling.jobs; +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; /** @@ -25,6 +27,7 @@ import javax.annotation.Nonnull; * it can perform further actions on it. JobTypeValves are used in place of static JobType declarations. * This interface is only implemented where static declaration of JobTypes does not satisfy the use cases. */ +@ProviderType public interface JobTypeValve { /** diff --git a/src/main/java/org/apache/sling/jobs/JobUpdate.java b/src/main/java/org/apache/sling/jobs/JobUpdate.java index 62723ad..333fcd9 100644 --- a/src/main/java/org/apache/sling/jobs/JobUpdate.java +++ b/src/main/java/org/apache/sling/jobs/JobUpdate.java @@ -19,6 +19,7 @@ package org.apache.sling.jobs; import org.apache.sling.mom.TopicManager; +import org.osgi.annotation.versioning.ProviderType; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -36,6 +37,7 @@ import java.util.Map; * The API does not specify the implementation, only that the various JobUpdate messages are delivered with an delay appropriate for the * type of message, identified by the JobUpdateCommand type. */ +@ProviderType public interface JobUpdate { /** diff --git a/src/main/java/org/apache/sling/jobs/JobUpdateBuilder.java b/src/main/java/org/apache/sling/jobs/JobUpdateBuilder.java index d691348..e4c938d 100644 --- a/src/main/java/org/apache/sling/jobs/JobUpdateBuilder.java +++ b/src/main/java/org/apache/sling/jobs/JobUpdateBuilder.java @@ -19,6 +19,8 @@ package org.apache.sling.jobs; +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Map; @@ -26,6 +28,7 @@ import java.util.Map; /** * Create a job update ading properties and building. */ +@ProviderType public interface JobUpdateBuilder { @Nonnull diff --git a/src/main/java/org/apache/sling/jobs/JobUpdateListener.java b/src/main/java/org/apache/sling/jobs/JobUpdateListener.java index 82a2c63..7cbaa59 100644 --- a/src/main/java/org/apache/sling/jobs/JobUpdateListener.java +++ b/src/main/java/org/apache/sling/jobs/JobUpdateListener.java @@ -18,12 +18,15 @@ */ package org.apache.sling.jobs; +import org.osgi.annotation.versioning.ProviderType; + import javax.annotation.Nonnull; /** * Listens for JobUpdate messages. * Examples of a JobUpdateListener include implementations of a Job that consumes JobUpdateMessages, or JobConsumers that execute a Job. */ +@ProviderType public interface JobUpdateListener { /** diff --git a/src/main/java/org/apache/sling/jobs/impl/spi/JobStarter.java b/src/main/java/org/apache/sling/jobs/impl/spi/JobStarter.java index f9ccd76..eedbbd6 100644 --- a/src/main/java/org/apache/sling/jobs/impl/spi/JobStarter.java +++ b/src/main/java/org/apache/sling/jobs/impl/spi/JobStarter.java @@ -19,10 +19,12 @@ package org.apache.sling.jobs.impl.spi; import org.apache.sling.jobs.Job; +import org.osgi.annotation.versioning.ProviderType; /** * Starts a job, used by the JobBuilderImpl to perform the add operation. */ +@ProviderType public interface JobStarter { Job start(Job j); } diff --git a/src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java b/src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java index e33968f..881e30b 100644 --- a/src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java +++ b/src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java @@ -20,6 +20,7 @@ package org.apache.sling.jobs.impl.spi; import org.apache.sling.jobs.Job; +import org.osgi.annotation.versioning.ProviderType; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -27,6 +28,7 @@ import javax.annotation.Nullable; /** * Provides JobStorage local to the JVM. Implementation may or may not decide to persist over restarts, page, etc */ +@ProviderType public interface JobStorage { diff --git a/src/main/java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java b/src/main/java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java index 2266ee6..54a9ba2 100644 --- a/src/main/java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java +++ b/src/main/java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java @@ -18,12 +18,15 @@ */ package org.apache.sling.jobs.impl.spi; +import org.osgi.annotation.versioning.ProviderType; + /** * Objects that can be converted to and from a Map are expected to extend this base class. * The values contained in the Map are expected to be Maps or values that can be serialised into most * common formats. It would be safe to use json or yaml as an example of a common format. * */ +@ProviderType public interface MapValueAdapter { -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
