From 23216076a9c7620243d89ea370c025db10d9b30b Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 29 Apr 2015 08:35:01 +1000 Subject: [PATCH] renamed EatWhatYouKill to ExecuteProduceConsume --- .../org/eclipse/jetty/util/thread/ExecutionStrategy.java | 4 ++-- .../{ExecuteProduceRun.java => ExecuteProduceConsume.java} | 6 +++--- .../strategy/{ProduceRun.java => ProduceConsume.java} | 4 ++-- .../{ProduceExecuteRun.java => ProduceExecuteConsume.java} | 4 ++-- .../jetty/util/thread/strategy/ExecuteProduceRunTest.java | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) rename jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/{ExecuteProduceRun.java => ExecuteProduceConsume.java} (97%) rename jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/{ProduceRun.java => ProduceConsume.java} (92%) rename jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/{ProduceExecuteRun.java => ProduceExecuteConsume.java} (93%) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java index d2c4f5fc137..b5769727361 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ExecutionStrategy.java @@ -24,7 +24,7 @@ import java.util.concurrent.Executor; import org.eclipse.jetty.util.Loader; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; -import org.eclipse.jetty.util.thread.strategy.ExecuteProduceRun; +import org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume; /** *

An {@link ExecutionStrategy} executes {@link Runnable} tasks produced by a {@link Producer}. @@ -94,7 +94,7 @@ public interface ExecutionStrategy } } - return new ExecuteProduceRun(producer,executor); + return new ExecuteProduceConsume(producer,executor); } } } diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRun.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java similarity index 97% rename from jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRun.java rename to jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java index 77df766eed9..ea2e984e248 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRun.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceConsume.java @@ -41,9 +41,9 @@ import org.eclipse.jetty.util.thread.SpinLock.Lock; * pressure on producers. *

*/ -public class ExecuteProduceRun implements ExecutionStrategy, Runnable +public class ExecuteProduceConsume implements ExecutionStrategy, Runnable { - private static final Logger LOG = Log.getLogger(ExecuteProduceRun.class); + private static final Logger LOG = Log.getLogger(ExecuteProduceConsume.class); private final SpinLock _lock = new SpinLock(); private final Runnable _runExecute = new RunExecute(); private final Producer _producer; @@ -53,7 +53,7 @@ public class ExecuteProduceRun implements ExecutionStrategy, Runnable private boolean _producing; private boolean _pending; - public ExecuteProduceRun(Producer producer, Executor executor) + public ExecuteProduceConsume(Producer producer, Executor executor) { this._producer = producer; this._executor = executor; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceRun.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceConsume.java similarity index 92% rename from jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceRun.java rename to jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceConsume.java index dd3f5559242..cf6fe12363d 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceRun.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceConsume.java @@ -26,12 +26,12 @@ import org.eclipse.jetty.util.thread.ExecutionStrategy; *

A strategy where the caller thread iterates over task production, submitting each * task to an {@link Executor} for execution.

*/ -public class ProduceRun implements ExecutionStrategy, Runnable +public class ProduceConsume implements ExecutionStrategy, Runnable { private final Producer _producer; private final Executor _executor; - public ProduceRun(Producer producer, Executor executor) + public ProduceConsume(Producer producer, Executor executor) { this._producer = producer; this._executor = executor; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteRun.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java similarity index 93% rename from jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteRun.java rename to jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java index 31e2f477692..b60a7f1102d 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteRun.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/ProduceExecuteConsume.java @@ -28,13 +28,13 @@ import org.eclipse.jetty.util.thread.ExecutionStrategy; *

A strategy where the caller thread iterates over task production, submitting each * task to an {@link Executor} for execution.

*/ -public class ProduceExecuteRun implements ExecutionStrategy +public class ProduceExecuteConsume implements ExecutionStrategy { private static final Logger LOG = Log.getLogger(ExecutionStrategy.class); private final Producer _producer; private final Executor _executor; - public ProduceExecuteRun(Producer producer, Executor executor) + public ProduceExecuteConsume(Producer producer, Executor executor) { this._producer = producer; this._executor = executor; diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRunTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRunTest.java index ab1df8bac38..e2699cb70e2 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRunTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/strategy/ExecuteProduceRunTest.java @@ -47,7 +47,7 @@ public class ExecuteProduceRunTest }; - ExecuteProduceRun _ewyk; + ExecuteProduceConsume _ewyk; final BlockingQueue _produce = new BlockingArrayQueue<>(); final Queue _executions = new ConcurrentArrayQueue<>(); volatile Thread _producer; @@ -91,7 +91,7 @@ public class ExecuteProduceRunTest } }; - _ewyk = new ExecuteProduceRun(producer,executor); + _ewyk = new ExecuteProduceConsume(producer,executor); } @After