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 d4a02256f4837f90c49bffbb7055a85c9dc34295 Author: Ian Boston <[email protected]> AuthorDate: Wed Oct 5 09:21:31 2016 +0000 SLING-5645 fixes to javadoc git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/commons/mom/jobs/core@1763369 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/sling/jobs/Job.java | 11 ++++++++++- src/main/java/org/apache/sling/jobs/JobCallback.java | 2 +- src/main/java/org/apache/sling/jobs/JobManager.java | 1 + src/main/java/org/apache/sling/jobs/JobTypeValve.java | 2 +- src/main/java/org/apache/sling/jobs/JobUpdate.java | 7 +++++-- src/main/java/org/apache/sling/jobs/JobUpdateListener.java | 2 +- src/main/java/org/apache/sling/jobs/Types.java | 8 ++++---- src/main/java/org/apache/sling/jobs/impl/JobImpl.java | 2 +- src/main/java/org/apache/sling/jobs/impl/JobManagerImpl.java | 4 ++-- .../java/org/apache/sling/jobs/impl/JobUpdateBuilderImpl.java | 2 +- src/main/java/org/apache/sling/jobs/impl/Utils.java | 2 +- src/main/java/org/apache/sling/jobs/impl/spi/JobStorage.java | 2 +- .../java/org/apache/sling/jobs/impl/spi/MapValueAdapter.java | 4 ++-- 13 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/apache/sling/jobs/Job.java b/src/main/java/org/apache/sling/jobs/Job.java index e2dd33d..284f346 100644 --- a/src/main/java/org/apache/sling/jobs/Job.java +++ b/src/main/java/org/apache/sling/jobs/Job.java @@ -86,18 +86,21 @@ public interface Job { /** * On first execution the value of this property is zero. * This property is managed by the job handling. + * @return the retry count. */ int getRetryCount(); /** * The property to track the retry maximum retry count for jobs. * This property is managed by the job handling. + * @return the number of retries. */ int getNumberOfRetries(); /** * The time when the job started. + * @return the epch time in ms when the job was started. */ long getStarted(); @@ -109,13 +112,14 @@ public interface Job { /** * Get the job state + * @return the job state. */ @Nonnull JobState getJobState(); /** * Set the new state. - * @param newState + * @param newState the new state. */ void setState(@Nonnull JobState newState); @@ -135,6 +139,10 @@ public interface Job { @Nullable String getResultMessage(); + /** + * + * @return a Job update builder. + */ @Nonnull JobUpdateBuilder newJobUpdateBuilder(); @@ -148,6 +156,7 @@ public interface Job { /** * Set the current job controller. + * @param jobController the job controller. */ void setJobController(@Nonnull JobController jobController); diff --git a/src/main/java/org/apache/sling/jobs/JobCallback.java b/src/main/java/org/apache/sling/jobs/JobCallback.java index 4fc84e3..4348e47 100644 --- a/src/main/java/org/apache/sling/jobs/JobCallback.java +++ b/src/main/java/org/apache/sling/jobs/JobCallback.java @@ -31,7 +31,7 @@ public interface JobCallback { /** * Call back with an update job state. - * @param finalJobState + * @param finalJobState job state. */ void callback(Job finalJobState); } diff --git a/src/main/java/org/apache/sling/jobs/JobManager.java b/src/main/java/org/apache/sling/jobs/JobManager.java index e23db30..1354342 100644 --- a/src/main/java/org/apache/sling/jobs/JobManager.java +++ b/src/main/java/org/apache/sling/jobs/JobManager.java @@ -139,6 +139,7 @@ public interface JobManager { * When a job is stopped and the job consumer supports stopping the job processing, it is up * to the job consumer how the stopping is handled. The job can be marked as finished successful, * permanently failed or being retried. + * @param jobId the job id to stop. */ void stopJobById(@Nonnull String jobId); diff --git a/src/main/java/org/apache/sling/jobs/JobTypeValve.java b/src/main/java/org/apache/sling/jobs/JobTypeValve.java index 2b75599..3be4f34 100644 --- a/src/main/java/org/apache/sling/jobs/JobTypeValve.java +++ b/src/main/java/org/apache/sling/jobs/JobTypeValve.java @@ -32,7 +32,7 @@ public interface JobTypeValve { /** * Return true if the component, normally a JobConsumer, can process the jobType. - * @param jobType + * @param jobType the job type. * @return true if can be processed. */ boolean accept(@Nonnull Types.JobType jobType); diff --git a/src/main/java/org/apache/sling/jobs/JobUpdate.java b/src/main/java/org/apache/sling/jobs/JobUpdate.java index 333fcd9..301cf47 100644 --- a/src/main/java/org/apache/sling/jobs/JobUpdate.java +++ b/src/main/java/org/apache/sling/jobs/JobUpdate.java @@ -33,7 +33,7 @@ import java.util.Map; * put the JobUpdates that start a message on a separate queue from the JobUpdates that update, abort or stop a job, so that * those messages do not get delayed by a backlog of job start messages. Alternatively the implementation may decide to implement * a scheduler that consumes job start messages at full queue throughput and queue jobs into a separate implementation specific queue. - * <p/> + * <p> * 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. */ @@ -56,7 +56,7 @@ public interface JobUpdate { * exist on the receiver the update message may be stored until the TTL expires before it is applied. This allows * messages sent out of order to wait till expires has been reached before applying the update. The rules determining * how expiring messages are applied is an implementation detail. - * @return + * @return the epoch time in ms when the update expires. */ long expires(); @@ -125,18 +125,21 @@ public interface JobUpdate { /** * On first execution the value of this property is zero. * This property is managed by the job handling. + * @return the retry count. */ int getRetryCount(); /** * The property to track the retry maximum retry count for jobs. * This property is managed by the job handling. + * @return the number of retries. */ int getNumberOfRetries(); /** * The time when the job started. + * @return epoch time when the job was started. */ long getStarted(); diff --git a/src/main/java/org/apache/sling/jobs/JobUpdateListener.java b/src/main/java/org/apache/sling/jobs/JobUpdateListener.java index 7cbaa59..3e6e90d 100644 --- a/src/main/java/org/apache/sling/jobs/JobUpdateListener.java +++ b/src/main/java/org/apache/sling/jobs/JobUpdateListener.java @@ -31,7 +31,7 @@ public interface JobUpdateListener { /** * Update the job state with a message. - * @param update + * @param update update message. */ void update(@Nonnull JobUpdate update); } diff --git a/src/main/java/org/apache/sling/jobs/Types.java b/src/main/java/org/apache/sling/jobs/Types.java index 00f6501..da7c763 100644 --- a/src/main/java/org/apache/sling/jobs/Types.java +++ b/src/main/java/org/apache/sling/jobs/Types.java @@ -56,8 +56,8 @@ public final class Types { /** * Create a JobQueue from a string represtnation, normally this us a path representing the jobQueue, although the path * hierachy may not have any significance depending on the MoM implementation. - * @param jobQueue - * @return + * @param jobQueue job queue name. + * @return the job queue. */ public static JobQueue jobQueue(String jobQueue) { return new JobQueueImpl(jobQueue); @@ -65,8 +65,8 @@ public final class Types { /** * Create a JobType from a string representation. - * @param jobType - * @return + * @param jobType job type name. + * @return job type. */ public static JobType jobType(String jobType) { return new JobTypeImpl(jobType); diff --git a/src/main/java/org/apache/sling/jobs/impl/JobImpl.java b/src/main/java/org/apache/sling/jobs/impl/JobImpl.java index ebc0971..6ece8f1 100644 --- a/src/main/java/org/apache/sling/jobs/impl/JobImpl.java +++ b/src/main/java/org/apache/sling/jobs/impl/JobImpl.java @@ -147,7 +147,7 @@ public class JobImpl implements Job, JobUpdateListener { /** * Apply an job update to this job, checking that the update is valid for the job. - * @param jobUpdate + * @param jobUpdate job update. */ @Override public void update(@Nonnull JobUpdate jobUpdate) { diff --git a/src/main/java/org/apache/sling/jobs/impl/JobManagerImpl.java b/src/main/java/org/apache/sling/jobs/impl/JobManagerImpl.java index 5d9ff4b..58bb464 100644 --- a/src/main/java/org/apache/sling/jobs/impl/JobManagerImpl.java +++ b/src/main/java/org/apache/sling/jobs/impl/JobManagerImpl.java @@ -49,8 +49,8 @@ public class JobManagerImpl implements JobManager, JobStarter, JobUpdateListene /** * - * @param jobStorage - * @param messageSender + * @param jobStorage job storage used by the manager. + * @param messageSender the message sender that listens for updates. */ public JobManagerImpl(JobStorage jobStorage, JobUpdateListener messageSender) { this.jobStorage = jobStorage; diff --git a/src/main/java/org/apache/sling/jobs/impl/JobUpdateBuilderImpl.java b/src/main/java/org/apache/sling/jobs/impl/JobUpdateBuilderImpl.java index 028dc3b..f708c25 100644 --- a/src/main/java/org/apache/sling/jobs/impl/JobUpdateBuilderImpl.java +++ b/src/main/java/org/apache/sling/jobs/impl/JobUpdateBuilderImpl.java @@ -38,7 +38,7 @@ public class JobUpdateBuilderImpl implements JobUpdateBuilder { /** * Create a JobUpdateBuilder from a job. - * @param job + * @param job the job. */ public JobUpdateBuilderImpl(@Nonnull Job job) { this.job = job; diff --git a/src/main/java/org/apache/sling/jobs/impl/Utils.java b/src/main/java/org/apache/sling/jobs/impl/Utils.java index 53d4475..662d002 100644 --- a/src/main/java/org/apache/sling/jobs/impl/Utils.java +++ b/src/main/java/org/apache/sling/jobs/impl/Utils.java @@ -97,7 +97,7 @@ public class Utils { /** * Generate an ID based on the unique name of the jvm process and a counter. - * @return + * @return a generated ID. */ @Nonnull public static String generateId() { 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 881e30b..bd421ab 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 @@ -50,7 +50,7 @@ public interface JobStorage { /** * Remove the Job - * @param jobId + * @param jobId the job id. * @return the job removed or null if not present. */ @Nullable 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 54a9ba2..2018243 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 @@ -32,12 +32,12 @@ public interface MapValueAdapter { /** * Populate the object from a map value. - * @param mapValue + * @param mapValue object representing the map value. */ void fromMapValue(Object mapValue); /** - * Adapt the object into a value suitable for use in a map to be serialised by standard map -> json,yaml writers. + * Adapt the object into a value suitable for use in a map to be serialised by standard map to json,yaml writers. * @return a value, which may be a primitive, an array or a map of primitives. */ Object toMapValue(); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
