You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2016/05/20 09:08:23 UTC
incubator-slider git commit: SLIDER-1127 slider workflow classes have
some javadoc/codestyle issues
Repository: incubator-slider
Updated Branches:
refs/heads/develop 39e760232 -> f3334cc3c
SLIDER-1127 slider workflow classes have some javadoc/codestyle issues
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/f3334cc3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/f3334cc3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/f3334cc3
Branch: refs/heads/develop
Commit: f3334cc3c20974e67f1647aec35905179ad8d3d8
Parents: 39e7602
Author: Steve Loughran <st...@apache.org>
Authored: Fri May 20 10:08:15 2016 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri May 20 10:08:15 2016 +0100
----------------------------------------------------------------------
.../slider/server/services/workflow/LongLivedProcess.java | 8 ++++----
.../services/workflow/ServiceTerminatingRunnable.java | 4 ++--
.../server/services/workflow/ServiceThreadFactory.java | 10 +++++-----
.../server/services/workflow/WorkflowCallbackService.java | 9 ++++++---
4 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f3334cc3/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
index 9bd4d3d..9e9e7ac 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/LongLivedProcess.java
@@ -53,8 +53,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
* <li>Output is streamed to the output logger provided</li>.
* <li>the input stream is closed as soon as the process starts.</li>
* <li>The most recent lines of output are saved to a linked list</li>.
- * <li>A synchronous callback, {@link LongLivedProcessLifecycleEvent}, is raised on the start
- * and finish of a process.</li>
+ * <li>A synchronous callback, {@link LongLivedProcessLifecycleEvent},
+ * is raised on the start and finish of a process.</li>
* </ol>
*
*/
@@ -65,12 +65,12 @@ public class LongLivedProcess implements Runnable {
public static final int RECENT_LINE_LOG_LIMIT = 64;
/**
- * Const defining the time in millis between polling for new text
+ * Const defining the time in millis between polling for new text.
*/
private static final int STREAM_READER_SLEEP_TIME = 200;
/**
- * limit on the length of a stream before it triggers an automatic newline
+ * limit on the length of a stream before it triggers an automatic newline.
*/
private static final int LINE_LENGTH = 256;
private final ProcessBuilder processBuilder;
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f3334cc3/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java
index ec0c61d..dc591df 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceTerminatingRunnable.java
@@ -32,7 +32,7 @@ public class ServiceTerminatingRunnable implements Runnable {
private Exception exception;
/**
- * Create an instance
+ * Create an instance.
* @param owner owning service
* @param action action to execute before terminating the service
*/
@@ -44,7 +44,7 @@ public class ServiceTerminatingRunnable implements Runnable {
}
/**
- * Get the owning service
+ * Get the owning service.
* @return the service to receive notification when
* the runnable completes.
*/
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f3334cc3/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java
index 99a2c28..737197b 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/ServiceThreadFactory.java
@@ -42,9 +42,10 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public class ServiceThreadFactory implements ThreadFactory {
- private static AtomicInteger counter = new AtomicInteger(1);
+ private static final AtomicInteger counter = new AtomicInteger(1);
+
/**
- * Default format for thread names: {@value}
+ * Default format for thread names: {@value}.
*/
public static final String DEFAULT_NAMING_FORMAT = "%s-%03d";
private final String name;
@@ -68,8 +69,7 @@ public class ServiceThreadFactory implements ThreadFactory {
}
/**
- *
- * Create an instance with the default naming format
+ * Create an instance with the default naming format.
* @param name base thread name
* @param daemons flag to indicate the threads should be marked as daemons
*/
@@ -89,7 +89,7 @@ public class ServiceThreadFactory implements ThreadFactory {
}
/**
- * Create a single thread executor using this naming policy
+ * Create a single thread executor using this naming policy.
* @param name base thread name
* @param daemons flag to indicate the threads should be marked as daemons
* @return an executor
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f3334cc3/slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java b/slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java
index 74d5623..65d14b7 100644
--- a/slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/services/workflow/WorkflowCallbackService.java
@@ -30,7 +30,9 @@ import java.util.concurrent.TimeUnit;
/**
* A service that calls the supplied callback when it is started -after the
- * given delay. It can be configured to stop itself after the callback has
+ * given delay.
+ *
+ * It can be configured to stop itself after the callback has
* completed, marking any exception raised as the exception of this service.
* The notifications come in on a callback thread -a thread that is only
* started in this service's <code>start()</code> operation.
@@ -38,9 +40,10 @@ import java.util.concurrent.TimeUnit;
public class WorkflowCallbackService<V> extends
WorkflowScheduledExecutorService<ScheduledExecutorService> {
protected static final Logger LOG =
- LoggerFactory.getLogger(WorkflowCallbackService.class);
+ LoggerFactory.getLogger(WorkflowCallbackService.class);
+
/**
- * This is the callback
+ * This is the callback.
*/
private final Callable<V> callback;
private final int delay;