aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevi...@apache.org
Subject aurora git commit: Make Storage.Work an interface instead of an abstract class.
Date Thu, 23 Jul 2015 05:43:56 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 38c2e769c -> 96b56b885


Make Storage.Work an interface instead of an abstract class.

Make `Storage.Work` and friends interfaces instead of abstract classes.

This allows you to pass lambdas and method references to calls to
`storage.work`. The main ripple is that as interface methods, `apply`
and `execute` must be public. This was done programmatically with a sed
script.

Testing Done:
./gradlew -Pq build

Reviewed at https://reviews.apache.org/r/36713/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/96b56b88
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/96b56b88
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/96b56b88

Branch: refs/heads/master
Commit: 96b56b8851eb9c42b87a057afed1171610198b3f
Parents: 38c2e76
Author: Kevin Sweeney <kevints@apache.org>
Authored: Wed Jul 22 22:44:00 2015 -0700
Committer: Kevin Sweeney <kevints@apache.org>
Committed: Wed Jul 22 22:44:00 2015 -0700

----------------------------------------------------------------------
 .../aurora/benchmark/SchedulingBenchmarks.java  |  4 ++--
 .../aurora/benchmark/StatusUpdateBenchmark.java |  2 +-
 .../aurora/benchmark/ThriftApiBenchmarks.java   |  2 +-
 .../aurora/benchmark/UpdateStoreBenchmarks.java |  4 ++--
 .../aurora/scheduler/SchedulerLifecycle.java    |  9 +------
 .../aurora/scheduler/TaskStatusHandlerImpl.java |  2 +-
 .../scheduler/cron/quartz/AuroraCronJob.java    |  4 ++--
 .../cron/quartz/CronJobManagerImpl.java         |  2 +-
 .../scheduler/mesos/MesosSchedulerImpl.java     |  4 ++--
 .../scheduler/pruning/TaskHistoryPruner.java    |  2 +-
 .../scheduler/scheduling/TaskThrottler.java     |  2 +-
 .../storage/CallOrderEnforcingStorage.java      |  2 +-
 .../aurora/scheduler/storage/Storage.java       | 25 +++++++++++++-------
 .../scheduler/storage/backup/Recovery.java      |  2 +-
 .../storage/backup/TemporaryStorage.java        |  2 +-
 .../storage/db/RowGarbageCollector.java         |  2 +-
 .../scheduler/storage/log/LogStorage.java       |  8 +++----
 .../storage/log/SnapshotStoreImpl.java          |  2 +-
 .../thrift/SchedulerThriftInterface.java        |  8 +++----
 .../updater/JobUpdateControllerImpl.java        | 12 +++++-----
 .../cron/quartz/AuroraCronJobTest.java          |  4 ++--
 .../cron/quartz/CronJobManagerImplTest.java     |  2 +-
 .../scheduling/TaskSchedulerImplTest.java       |  2 +-
 .../scheduler/scheduling/TaskSchedulerTest.java |  6 ++---
 .../scheduler/state/StateManagerImplTest.java   | 10 ++++----
 .../scheduler/stats/ResourceCounterTest.java    |  4 ++--
 .../storage/AbstractCronJobStoreTest.java       | 10 ++++----
 .../storage/AbstractTaskStoreTest.java          | 10 ++++----
 .../scheduler/storage/StorageBackfillTest.java  |  4 ++--
 .../storage/db/DbAttributeStoreTest.java        |  6 ++---
 .../scheduler/storage/db/DbStorageTest.java     |  2 +-
 .../scheduler/storage/log/LogStorageTest.java   |  8 +++----
 .../storage/mem/InMemTaskStoreTest.java         |  2 +-
 .../storage/mem/StorageTransactionTest.java     | 22 ++++++++---------
 .../aurora/scheduler/updater/JobUpdaterIT.java  | 22 ++++++++---------
 35 files changed, 107 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java
----------------------------------------------------------------------
diff --git a/src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java b/src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java
index 5716f23..5bc73d5 100644
--- a/src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java
+++ b/src/jmh/java/org/apache/aurora/benchmark/SchedulingBenchmarks.java
@@ -206,7 +206,7 @@ public class SchedulingBenchmarks {
     private void saveTasks(final Set<IScheduledTask> tasks) {
       storage.write(new Storage.MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           storeProvider.getUnsafeTaskStore().saveTasks(tasks);
         }
       });
@@ -215,7 +215,7 @@ public class SchedulingBenchmarks {
     private void saveHostAttributes(final Set<IHostAttributes> hostAttributesToSave) {
       storage.write(new Storage.MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           for (IHostAttributes attributes : hostAttributesToSave) {
             storeProvider.getAttributeStore().saveHostAttributes(attributes);
           }

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java
----------------------------------------------------------------------
diff --git a/src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java b/src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java
index 3931d02..425d27c 100644
--- a/src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java
+++ b/src/jmh/java/org/apache/aurora/benchmark/StatusUpdateBenchmark.java
@@ -285,7 +285,7 @@ public class StatusUpdateBenchmark {
 
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(tasks);
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/jmh/java/org/apache/aurora/benchmark/ThriftApiBenchmarks.java
----------------------------------------------------------------------
diff --git a/src/jmh/java/org/apache/aurora/benchmark/ThriftApiBenchmarks.java b/src/jmh/java/org/apache/aurora/benchmark/ThriftApiBenchmarks.java
index c3f8b25..b2a3e9b 100644
--- a/src/jmh/java/org/apache/aurora/benchmark/ThriftApiBenchmarks.java
+++ b/src/jmh/java/org/apache/aurora/benchmark/ThriftApiBenchmarks.java
@@ -160,7 +160,7 @@ public class ThriftApiBenchmarks {
     // interface requires considerably more binding setup.
     storage.bulkLoad(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         for (int roleId = 0; roleId < config.roles; roleId++) {
           String role = "role" + roleId;
           for (int envId = 0; envId < config.envs; envId++) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java
----------------------------------------------------------------------
diff --git a/src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java b/src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java
index cc42741..9755ee5 100644
--- a/src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java
+++ b/src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java
@@ -71,7 +71,7 @@ public class UpdateStoreBenchmarks {
     public void setUpIteration() {
       storage.write(new Storage.MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           JobUpdateStore.Mutable updateStore = storeProvider.getJobUpdateStore();
           Set<IJobUpdateDetails> updates =
               new JobUpdates.Builder().setNumInstanceEvents(instances).build(1);
@@ -103,7 +103,7 @@ public class UpdateStoreBenchmarks {
     public void tearDownIteration() {
       storage.write(new Storage.MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           storeProvider.getJobUpdateStore().deleteAllUpdatesAndEvents();
           storeProvider.getLockStore().deleteLocks();
         }

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java b/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
index 3275189..e3429b3 100644
--- a/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
+++ b/src/main/java/org/apache/aurora/scheduler/SchedulerLifecycle.java
@@ -57,8 +57,6 @@ import org.apache.aurora.scheduler.events.EventSink;
 import org.apache.aurora.scheduler.events.PubsubEvent.DriverRegistered;
 import org.apache.aurora.scheduler.events.PubsubEvent.EventSubscriber;
 import org.apache.aurora.scheduler.mesos.Driver;
-import org.apache.aurora.scheduler.storage.Storage.MutableStoreProvider;
-import org.apache.aurora.scheduler.storage.Storage.MutateWork;
 import org.apache.aurora.scheduler.storage.Storage.NonVolatileStorage;
 import org.apache.aurora.scheduler.storage.StorageBackfill;
 
@@ -249,12 +247,7 @@ public class SchedulerLifecycle implements EventSubscriber {
       @Override
       public void execute(Transition<State> transition) {
         LOG.info("Elected as leading scheduler!");
-        storage.start(new MutateWork.NoResult.Quiet() {
-          @Override
-          protected void execute(MutableStoreProvider storeProvider) {
-            StorageBackfill.backfill(storeProvider);
-          }
-        });
+        storage.start(StorageBackfill::backfill);
 
         driver.startAsync().awaitRunning();
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java b/src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java
index ede8517..24a7a2c 100644
--- a/src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java
@@ -149,7 +149,7 @@ public class TaskStatusHandlerImpl extends AbstractExecutionThreadService
       try {
         storage.write(new Storage.MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(Storage.MutableStoreProvider storeProvider) {
+          public void execute(Storage.MutableStoreProvider storeProvider) {
             for (TaskStatus status : updates) {
               ScheduleStatus translatedState = Conversions.convertProtoState(status.getState());
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java b/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java
index a33bb8b..7ed50ca 100644
--- a/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java
+++ b/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java
@@ -179,7 +179,7 @@ class AuroraCronJob implements Job {
 
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         for (String taskId : deferredLaunch.get().activeTaskIds) {
           stateManager.changeState(
               storeProvider,
@@ -204,7 +204,7 @@ class AuroraCronJob implements Job {
             LOG.info("Initiating delayed launch of cron " + path);
             storage.write(new Storage.MutateWork.NoResult.Quiet() {
               @Override
-              protected void execute(Storage.MutableStoreProvider storeProvider) {
+              public void execute(Storage.MutableStoreProvider storeProvider) {
                 stateManager.insertPendingTasks(
                     storeProvider,
                     deferredLaunch.get().task,

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java b/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
index 0081c5c..e377fd8 100644
--- a/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java
@@ -124,7 +124,7 @@ class CronJobManagerImpl implements CronJobManager {
     final IJobKey jobKey = cronJob.getSanitizedConfig().getJobConfig().getKey();
     storage.write(new MutateWork.NoResult<CronException>() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) throws CronException {
+      public void execute(Storage.MutableStoreProvider storeProvider) throws CronException {
         checkNotExists(jobKey, storeProvider.getCronJobStore());
 
         saveJob(cronJob, storeProvider.getCronJobStore());

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java b/src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java
index 7c8a008..da4f0a5 100644
--- a/src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/mesos/MesosSchedulerImpl.java
@@ -132,7 +132,7 @@ public class MesosSchedulerImpl implements Scheduler {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getSchedulerStore().saveFrameworkId(frameworkId.getValue());
       }
     });
@@ -165,7 +165,7 @@ public class MesosSchedulerImpl implements Scheduler {
         //                offers when the host attributes cannot be found. (AURORA-137)
         storage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             for (Offer offer : offers) {
               IHostAttributes attributes =
                   AttributeStore.Util.mergeOffer(storeProvider.getAttributeStore(), offer);

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java b/src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java
index ef88d98..e6e76cd 100644
--- a/src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java
+++ b/src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java
@@ -125,7 +125,7 @@ public class TaskHistoryPruner implements EventSubscriber {
     LOG.info("Pruning inactive tasks " + taskIds);
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.deleteTasks(storeProvider, taskIds);
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/scheduling/TaskThrottler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskThrottler.java b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskThrottler.java
index b86bd28..e54e6c4 100644
--- a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskThrottler.java
+++ b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskThrottler.java
@@ -79,7 +79,7 @@ class TaskThrottler implements EventSubscriber {
             public void run() {
               storage.write(new Storage.MutateWork.NoResult.Quiet() {
                 @Override
-                protected void execute(Storage.MutableStoreProvider storeProvider) {
+                public void execute(Storage.MutableStoreProvider storeProvider) {
                   stateManager.changeState(
                       storeProvider,
                       stateChange.getTaskId(),

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/CallOrderEnforcingStorage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/CallOrderEnforcingStorage.java b/src/main/java/org/apache/aurora/scheduler/storage/CallOrderEnforcingStorage.java
index 64aa10d..cd761a3 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/CallOrderEnforcingStorage.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/CallOrderEnforcingStorage.java
@@ -93,7 +93,7 @@ public class CallOrderEnforcingStorage implements NonVolatileStorage {
     stateMachine.transition(State.READY);
     wrapped.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         Iterable<IScheduledTask> tasks = Tasks.LATEST_ACTIVITY.sortedCopy(
             storeProvider.getTaskStore().fetchTasks(Query.unscoped()));
         for (IScheduledTask task : tasks) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/Storage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/Storage.java b/src/main/java/org/apache/aurora/scheduler/storage/Storage.java
index 21f6a64..f699ba5 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/Storage.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/Storage.java
@@ -72,6 +72,7 @@ public interface Storage {
    * @param <T> Return type of the operation.
    * @param <E> Exception type thrown by the operation.
    */
+  @FunctionalInterface
   interface StorageOperation<S extends StoreProvider, T, E extends Exception> {
     /**
      * Abstracts a unit of work that has a result, but may also throw a specific exception.
@@ -89,14 +90,16 @@ public interface Storage {
    * @param <T> The type of result this unit of work produces.
    * @param <E> The type of exception this unit of work can throw.
    */
-  abstract class Work<T, E extends Exception> implements StorageOperation<StoreProvider, T, E> {
+  @FunctionalInterface
+  interface Work<T, E extends Exception> extends StorageOperation<StoreProvider, T, E> {
 
     /**
      * A convenient typedef for Work that throws no checked exceptions - it runs quietly.
      *
      * @param <T> The type of result this unit of work produces.
      */
-    public abstract static class Quiet<T> extends Work<T, RuntimeException> {
+    @FunctionalInterface
+    interface Quiet<T> extends Work<T, RuntimeException> {
       // typedef
     }
   }
@@ -107,15 +110,17 @@ public interface Storage {
    * @param <T> The type of result this unit of work produces.
    * @param <E> The type of exception this unit of work can throw.
    */
-  abstract class MutateWork<T, E extends Exception>
-      implements StorageOperation<MutableStoreProvider, T, E> {
+  @FunctionalInterface
+  interface MutateWork<T, E extends Exception>
+      extends StorageOperation<MutableStoreProvider, T, E> {
 
     /**
      * A convenient typedef for Work that throws no checked exceptions - it runs quietly.
      *
      * @param <T> The type of result this unit of work produces.
      */
-    public abstract static class Quiet<T> extends MutateWork<T, RuntimeException> {
+    @FunctionalInterface
+    interface Quiet<T> extends MutateWork<T, RuntimeException> {
       // typedef
     }
 
@@ -124,10 +129,11 @@ public interface Storage {
      *
      * @param <E> The type of exception this unit of work can throw.
      */
-    public abstract static class NoResult<E extends Exception> extends MutateWork<Void, E> {
+    @FunctionalInterface
+    interface NoResult<E extends Exception> extends MutateWork<Void, E> {
 
       @Override
-      public final Void apply(MutableStoreProvider storeProvider) throws E {
+      default Void apply(MutableStoreProvider storeProvider) throws E {
         execute(storeProvider);
         return null;
       }
@@ -139,13 +145,14 @@ public interface Storage {
        * @param storeProvider A provider to give access to different available stores.
        * @throws E if the unit of work could not be completed
        */
-      protected abstract void execute(MutableStoreProvider storeProvider) throws E;
+      void execute(MutableStoreProvider storeProvider) throws E;
 
       /**
        * A convenient typedef for Work with no result that throws no checked exceptions - it runs
        * quitely.
        */
-      public abstract static class Quiet extends NoResult<RuntimeException> {
+      @FunctionalInterface
+      interface Quiet extends NoResult<RuntimeException> {
         // typedef
       }
     }

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/backup/Recovery.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/backup/Recovery.java b/src/main/java/org/apache/aurora/scheduler/storage/backup/Recovery.java
index fb0dbae..37a32a8 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/backup/Recovery.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/backup/Recovery.java
@@ -192,7 +192,7 @@ public interface Recovery {
       void commit() {
         primaryStorage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             try {
               distributedStore.persist(tempStorage.toSnapshot());
               shutDownNow.execute();

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java b/src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java
index d0156d3..fc7c792 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java
@@ -77,7 +77,7 @@ interface TemporaryStorage {
         public void deleteTasks(final Query.Builder query) {
           storage.write(new MutateWork.NoResult.Quiet() {
             @Override
-            protected void execute(MutableStoreProvider storeProvider) {
+            public void execute(MutableStoreProvider storeProvider) {
               Set<String> ids = FluentIterable.from(storeProvider.getTaskStore().fetchTasks(query))
                   .transform(Tasks.SCHEDULED_TO_ID)
                   .toSet();

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollector.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollector.java b/src/main/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollector.java
index f1916a8..df6e583 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollector.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollector.java
@@ -74,7 +74,7 @@ class RowGarbageCollector extends AbstractScheduledService {
     for (Class<? extends GarbageCollectedTableMapper> tableClass : TABLES) {
       storage.write(new Storage.MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           try (SqlSession session = sessionFactory.openSession(true)) {
             GarbageCollectedTableMapper table = session.getMapper(tableClass);
             for (long rowId : table.selectAllRowIds()) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java b/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java
index 82be367..5cac52d 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/log/LogStorage.java
@@ -315,7 +315,7 @@ public class LogStorage implements NonVolatileStorage, DistributedSnapshotStore
           public void execute(final LogEntry logEntry) {
             write(new MutateWork.NoResult.Quiet() {
               @Override
-              protected void execute(MutableStoreProvider unused) {
+              public void execute(MutableStoreProvider unused) {
                 for (Op op : logEntry.getTransaction().getOps()) {
                   replayOp(op);
                 }
@@ -470,7 +470,7 @@ public class LogStorage implements NonVolatileStorage, DistributedSnapshotStore
   public synchronized void start(final MutateWork.NoResult.Quiet initializationLogic) {
     write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider unused) {
+      public void execute(MutableStoreProvider unused) {
         // Must have the underlying storage started so we can query it for the last checkpoint.
         // We replay these entries in the forwarded storage system's transactions but not ours - we
         // do not want to re-record these ops to the log.
@@ -495,7 +495,7 @@ public class LogStorage implements NonVolatileStorage, DistributedSnapshotStore
   void recover() throws RecoveryFailedException {
     writeBehindStorage.bulkLoad(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         try {
           streamManager.readFromBeginning(new Closure<LogEntry>() {
             @Override
@@ -564,7 +564,7 @@ public class LogStorage implements NonVolatileStorage, DistributedSnapshotStore
   void doSnapshot() throws CodingException, InvalidPositionException, StreamAccessException {
     write(new MutateWork.NoResult<CodingException>() {
       @Override
-      protected void execute(MutableStoreProvider unused)
+      public void execute(MutableStoreProvider unused)
           throws CodingException, InvalidPositionException, StreamAccessException {
 
         LOG.info("Creating snapshot.");

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java b/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
index 64b5b95..1471daa 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java
@@ -280,7 +280,7 @@ public class SnapshotStoreImpl implements SnapshotStore<Snapshot> {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         LOG.info("Restoring snapshot.");
 
         for (SnapshotField field : SNAPSHOT_FIELDS) {

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
index 22786de..062cce0 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
@@ -631,7 +631,7 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
         LOG.info("Restarting shards matching " + query);
         storage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             for (String taskId : Tasks.ids(matchingTasks)) {
               stateManager.changeState(
                   storeProvider,
@@ -666,7 +666,7 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
     try {
       storage.write(new MutateWork.NoResult<QuotaException>() {
         @Override
-        protected void execute(MutableStoreProvider store) throws QuotaException {
+        public void execute(MutableStoreProvider store) throws QuotaException {
           quotaManager.saveQuota(
               ownerRole,
               IResourceAggregate.build(resourceAggregate),
@@ -729,7 +729,7 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         stateManager.changeState(
             storeProvider,
             taskId,
@@ -953,7 +953,7 @@ class SchedulerThriftInterface implements AnnotatedAuroraAdmin {
 
           storage.write(new NoResult.Quiet() {
             @Override
-            protected void execute(MutableStoreProvider storeProvider) {
+            public void execute(MutableStoreProvider storeProvider) {
               stateManager.insertPendingTasks(
                   storeProvider,
                   task,

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java b/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
index ff06701..a779849 100644
--- a/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java
@@ -148,7 +148,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
 
     storage.write(new MutateWork.NoResult<UpdateStateException>() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider)
+      public void execute(MutableStoreProvider storeProvider)
           throws UpdateStateException {
 
         IJobUpdateSummary summary = update.getSummary();
@@ -216,7 +216,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
     LOG.info("Attempting to resume update " + key);
     storage.write(new MutateWork.NoResult<UpdateStateException>() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) throws UpdateStateException {
+      public void execute(MutableStoreProvider storeProvider) throws UpdateStateException {
         IJobUpdateDetails details = Iterables.getOnlyElement(
             storeProvider.getJobUpdateStore().fetchJobUpdateDetails(queryByUpdate(key)), null);
 
@@ -262,7 +262,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
   public void systemResume() {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         for (IJobUpdateDetails details
             : storeProvider.getJobUpdateStore().fetchJobUpdateDetails(ACTIVE_QUERY)) {
 
@@ -346,7 +346,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
   private void instanceChanged(final IInstanceKey instance, final Optional<IScheduledTask> state) {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         IJobKey job = instance.getJobKey();
         UpdateFactory.Update update = updates.get(job);
         if (update != null) {
@@ -398,7 +398,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
 
     storage.write(new MutateWork.NoResult<UpdateStateException>() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider)
+      public void execute(MutableStoreProvider storeProvider)
           throws UpdateStateException {
 
         IJobUpdateSummary update = Iterables.getOnlyElement(
@@ -740,7 +740,7 @@ class JobUpdateControllerImpl implements JobUpdateController {
       public void run() {
         storage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             IJobUpdateSummary summary =
                 getOnlyMatch(storeProvider.getJobUpdateStore(), queryByUpdate(key));
             JobUpdateStatus status = summary.getState().getStatus();

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java b/src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java
index 7894668..03418a8 100644
--- a/src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java
@@ -122,7 +122,7 @@ public class AuroraCronJobTest extends EasyMockTest {
     storage.write(
         new Storage.MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             storeProvider.getUnsafeTaskStore().deleteAllTasks();
           }
         });
@@ -132,7 +132,7 @@ public class AuroraCronJobTest extends EasyMockTest {
   private void populateTaskStore() {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(
             IScheduledTask.build(new ScheduledTask()
                 .setStatus(ScheduleStatus.RUNNING)

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java b/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java
index b8d88c7..6ddc851 100644
--- a/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java
@@ -247,7 +247,7 @@ public class CronJobManagerImplTest extends EasyMockTest {
   private void populateStorage() throws Exception {
     storage.write(new Storage.MutateWork.NoResult<Exception>() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) throws Exception {
+      public void execute(Storage.MutableStoreProvider storeProvider) throws Exception {
         storeProvider.getCronJobStore().saveAcceptedJob(
             QuartzTestUtil.makeSanitizedCronJob().getSanitizedConfig().getJobConfig());
       }

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
index 25d8da6..b964f81 100644
--- a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerImplTest.java
@@ -259,7 +259,7 @@ public class TaskSchedulerImplTest extends EasyMockTest {
 
     memStorage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider store) {
+      public void execute(MutableStoreProvider store) {
         store.getUnsafeTaskStore().saveTasks(ImmutableSet.of(taskA, taskB));
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerTest.java b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerTest.java
index 52af364..9a91e63 100644
--- a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskSchedulerTest.java
@@ -184,7 +184,7 @@ public class TaskSchedulerTest extends EasyMockTest {
     // Insert the task if it doesn't already exist.
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         TaskStore.Mutable taskStore = storeProvider.getUnsafeTaskStore();
         if (Iterables.isEmpty(taskStore.fetchTasks(Query.taskScoped(Tasks.id(copy))))) {
           taskStore.saveTasks(ImmutableSet.of(copy));
@@ -260,7 +260,7 @@ public class TaskSchedulerTest extends EasyMockTest {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider store) {
+      public void execute(MutableStoreProvider store) {
         store.getUnsafeTaskStore().saveTasks(ImmutableSet.of(a, b, c));
       }
     });
@@ -626,7 +626,7 @@ public class TaskSchedulerTest extends EasyMockTest {
     changeState(task, INIT, PENDING);
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().deleteTasks(Tasks.ids(task));
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java b/src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java
index 262f668..13c5fbb 100644
--- a/src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/state/StateManagerImplTest.java
@@ -114,7 +114,7 @@ public class StateManagerImplTest extends EasyMockTest {
         rescheduleCalculator);
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         AttributeStore.Mutable attributeStore = storeProvider.getAttributeStore();
         attributeStore.saveHostAttributes(HOST_A);
       }
@@ -408,7 +408,7 @@ public class StateManagerImplTest extends EasyMockTest {
     changeState(taskId, FINISHED);
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.deleteTasks(storeProvider, ImmutableSet.of(taskId));
       }
     });
@@ -474,7 +474,7 @@ public class StateManagerImplTest extends EasyMockTest {
     control.replay();
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.insertPendingTasks(
             storeProvider,
             NON_SERVICE_CONFIG,
@@ -545,7 +545,7 @@ public class StateManagerImplTest extends EasyMockTest {
   private void insertTask(final ITaskConfig task, final int instanceId) {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.insertPendingTasks(storeProvider, task, ImmutableSet.of(instanceId));
       }
     });
@@ -589,7 +589,7 @@ public class StateManagerImplTest extends EasyMockTest {
 
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.assignTask(
             storeProvider,
             taskId,

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java b/src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java
index ed834bc..a9c6d1d 100644
--- a/src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/stats/ResourceCounterTest.java
@@ -120,7 +120,7 @@ public class ResourceCounterTest {
   public void testComputeQuotaAllocationTotals() {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getQuotaStore()
             .saveQuota("a", IResourceAggregate.build(new ResourceAggregate(1, 1, 1)));
         storeProvider.getQuotaStore()
@@ -184,7 +184,7 @@ public class ResourceCounterTest {
   private void insertTasks(final IScheduledTask... tasks) {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
           storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.copyOf(tasks));
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java b/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
index c7329c9..25af7da 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java
@@ -113,7 +113,7 @@ public abstract class AbstractCronJobStoreTest {
     final IScheduledTask instance = TaskTestUtil.makeTask("a", JOB_A.getTaskConfig());
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(instance));
       }
     });
@@ -122,7 +122,7 @@ public abstract class AbstractCronJobStoreTest {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().mutateTasks(Query.taskScoped(Tasks.id(instance)),
             new TaskStore.Mutable.TaskMutation() {
               @Override
@@ -182,7 +182,7 @@ public abstract class AbstractCronJobStoreTest {
   private void saveAcceptedJob(final IJobConfiguration jobConfig) {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getCronJobStore().saveAcceptedJob(jobConfig);
       }
     });
@@ -191,7 +191,7 @@ public abstract class AbstractCronJobStoreTest {
   private void removeJob(final IJobKey jobKey) {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getCronJobStore().removeJob(jobKey);
       }
     });
@@ -200,7 +200,7 @@ public abstract class AbstractCronJobStoreTest {
   private void deleteJobs() {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getCronJobStore().deleteJobs();
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java b/src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java
index 775bb71..55ebcb8 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/AbstractTaskStoreTest.java
@@ -98,7 +98,7 @@ public abstract class AbstractTaskStoreTest extends TearDownTestCase {
 
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         AttributeStore.Mutable attributeStore = storeProvider.getAttributeStore();
         attributeStore.saveHostAttributes(HOST_A);
         attributeStore.saveHostAttributes(HOST_B);
@@ -122,7 +122,7 @@ public abstract class AbstractTaskStoreTest extends TearDownTestCase {
   private void saveTasks(final Set<IScheduledTask> tasks) {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.copyOf(tasks));
       }
     });
@@ -152,7 +152,7 @@ public abstract class AbstractTaskStoreTest extends TearDownTestCase {
   protected void deleteTasks(final String... taskIds) {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().deleteTasks(ImmutableSet.copyOf(taskIds));
       }
     });
@@ -161,7 +161,7 @@ public abstract class AbstractTaskStoreTest extends TearDownTestCase {
   protected void deleteAllTasks() {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().deleteAllTasks();
       }
     });
@@ -617,7 +617,7 @@ public abstract class AbstractTaskStoreTest extends TearDownTestCase {
     saveTasks(TASK_A);
     storage.write(new Storage.MutateWork.NoResult<Exception>() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) throws Exception {
+      public void execute(Storage.MutableStoreProvider storeProvider) throws Exception {
         IScheduledTask taskARunning = TaskTestUtil.addStateTransition(TASK_A, RUNNING, 1000L);
         saveTasks(taskARunning);
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/StorageBackfillTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/StorageBackfillTest.java b/src/test/java/org/apache/aurora/scheduler/storage/StorageBackfillTest.java
index a76ae48..7ccc273 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/StorageBackfillTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/StorageBackfillTest.java
@@ -54,7 +54,7 @@ public class StorageBackfillTest {
     final Set<IScheduledTask> backfilledTasks = ImmutableSet.of(IScheduledTask.build(task));
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(backfilledTasks);
       }
     });
@@ -69,7 +69,7 @@ public class StorageBackfillTest {
   private void backfill() {
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         StorageBackfill.backfill(storeProvider);
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/db/DbAttributeStoreTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/db/DbAttributeStoreTest.java b/src/test/java/org/apache/aurora/scheduler/storage/db/DbAttributeStoreTest.java
index a7de023..0e0a847 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/db/DbAttributeStoreTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/db/DbAttributeStoreTest.java
@@ -149,7 +149,7 @@ public class DbAttributeStoreTest {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(taskA));
       }
     });
@@ -165,7 +165,7 @@ public class DbAttributeStoreTest {
   private void insert(final IHostAttributes attributes) {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getAttributeStore().saveHostAttributes(attributes);
       }
     });
@@ -192,7 +192,7 @@ public class DbAttributeStoreTest {
   private void truncate() {
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getAttributeStore().deleteHostAttributes();
       }
     });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java b/src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java
index 15a9589..a4bcdd7 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/db/DbStorageTest.java
@@ -99,7 +99,7 @@ public class DbStorageTest extends EasyMockTest {
   public void testBulkLoad() {
     expect(sessionFactory.openSession(false)).andReturn(session);
     expect(session.update(DbStorage.DISABLE_UNDO_LOG)).andReturn(0);
-    writeWork.apply(EasyMock.anyObject());
+    expect(writeWork.apply(EasyMock.anyObject())).andReturn(null);
     session.close();
     expect(session.update(DbStorage.ENABLE_UNDO_LOG)).andReturn(0);
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java
index eabce16..902fa5a 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java
@@ -202,7 +202,7 @@ public class LogStorageTest extends EasyMockTest {
     final AtomicBoolean initialized = new AtomicBoolean(false);
     MutateWork.NoResult.Quiet initializationLogic = new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider provider) {
+      public void execute(MutableStoreProvider provider) {
         // Creating a mock and expecting apply(storeProvider) does not work here for whatever
         // reason.
         initialized.set(true);
@@ -429,7 +429,7 @@ public class LogStorageTest extends EasyMockTest {
       // reason.
       MutateWork.NoResult.Quiet initializationLogic = new NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           // No-op.
         }
       };
@@ -492,7 +492,7 @@ public class LogStorageTest extends EasyMockTest {
     protected void runTest() {
       logStorage.write(new MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(MutableStoreProvider storeProvider) {
+        public void execute(MutableStoreProvider storeProvider) {
           performMutations(storeProvider);
         }
       });
@@ -656,7 +656,7 @@ public class LogStorageTest extends EasyMockTest {
 
         logStorage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider innerProvider) {
+          public void execute(MutableStoreProvider innerProvider) {
             innerProvider.getUnsafeTaskStore().deleteTasks(tasksToRemove);
           }
         });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/mem/InMemTaskStoreTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/mem/InMemTaskStoreTest.java b/src/test/java/org/apache/aurora/scheduler/storage/mem/InMemTaskStoreTest.java
index 77efffb..034cce8 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/mem/InMemTaskStoreTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/mem/InMemTaskStoreTest.java
@@ -54,7 +54,7 @@ public class InMemTaskStoreTest extends AbstractTaskStoreTest {
     // Test for regression of AURORA-1305.
     storage.write(new Storage.MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         TaskStore.Mutable taskStore = storeProvider.getUnsafeTaskStore();
         taskStore.saveTasks(ImmutableSet.of(TASK_A));
         taskStore.deleteTasks(Tasks.ids(TASK_A));

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java b/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java
index 4ae194c..791ec14 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java
@@ -146,7 +146,7 @@ public class StorageTransactionTest extends TearDownTestCase {
     try {
       storage.write(new MutateWork.NoResult.Quiet() {
         @Override
-        protected void execute(MutableStoreProvider storeProvider) {
+        public void execute(MutableStoreProvider storeProvider) {
           storeProvider.getQuotaStore().saveQuota("a", quota);
           throw new CustomException();
         }
@@ -171,7 +171,7 @@ public class StorageTransactionTest extends TearDownTestCase {
   public void testOperations() {
     expectWriteFail(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("a"), makeTask("b")));
         throw new CustomException();
       }
@@ -180,7 +180,7 @@ public class StorageTransactionTest extends TearDownTestCase {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("a"), makeTask("b")));
       }
     });
@@ -188,7 +188,7 @@ public class StorageTransactionTest extends TearDownTestCase {
 
     expectWriteFail(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().deleteAllTasks();
         throw new CustomException();
       }
@@ -197,14 +197,14 @@ public class StorageTransactionTest extends TearDownTestCase {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().deleteAllTasks();
       }
     });
 
     expectWriteFail(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("a")));
         throw new CustomException();
       }
@@ -213,7 +213,7 @@ public class StorageTransactionTest extends TearDownTestCase {
 
     storage.write(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("a")));
       }
     });
@@ -221,11 +221,11 @@ public class StorageTransactionTest extends TearDownTestCase {
     // Nested transaction where inner transaction fails.
     expectWriteFail(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("c")));
         storage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("d")));
             throw new CustomException();
           }
@@ -237,11 +237,11 @@ public class StorageTransactionTest extends TearDownTestCase {
     // Nested transaction where outer transaction fails.
     expectWriteFail(new MutateWork.NoResult.Quiet() {
       @Override
-      protected void execute(MutableStoreProvider storeProvider) {
+      public void execute(MutableStoreProvider storeProvider) {
         storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("c")));
         storage.write(new MutateWork.NoResult.Quiet() {
           @Override
-          protected void execute(MutableStoreProvider storeProvider) {
+          public void execute(MutableStoreProvider storeProvider) {
             storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(makeTask("d")));
           }
         });

http://git-wip-us.apache.org/repos/asf/aurora/blob/96b56b88/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java b/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java
index f5e1dd0..0d0ee94 100644
--- a/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java
@@ -241,7 +241,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
       storage.write(new NoResult.Quiet() {
         @Override
-        protected void execute(Storage.MutableStoreProvider storeProvider) {
+        public void execute(Storage.MutableStoreProvider storeProvider) {
           assertEquals(StateChangeResult.SUCCESS, stateManager.changeState(
               storeProvider,
               getTaskId(job, instanceId),
@@ -305,7 +305,7 @@ public class JobUpdaterIT extends EasyMockTest {
   private void insertPendingTasks(final ITaskConfig task, final Set<Integer> instanceIds) {
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         stateManager.insertPendingTasks(storeProvider, task, instanceIds);
       }
     });
@@ -314,7 +314,7 @@ public class JobUpdaterIT extends EasyMockTest {
   private void insertInitialTasks(final IJobUpdate update) {
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         for (IInstanceTaskConfig config : update.getInstructions().getInitialState()) {
           insertPendingTasks(config.getTask(), expandInstanceIds(ImmutableSet.of(config)));
         }
@@ -462,7 +462,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD);
       }
     });
@@ -506,7 +506,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLL_FORWARD_AWAITING_PULSE);
       }
     });
@@ -541,7 +541,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLL_FORWARD_PAUSED);
       }
     });
@@ -680,7 +680,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD);
       }
     });
@@ -693,7 +693,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         storeProvider.getJobUpdateStore().deleteAllUpdatesAndEvents();
         releaseAllLocks();
       }
@@ -1055,7 +1055,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         JobUpdateStore.Mutable store = storeProvider.getJobUpdateStore();
         store.deleteAllUpdatesAndEvents();
 
@@ -1120,7 +1120,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD);
       }
     });
@@ -1151,7 +1151,7 @@ public class JobUpdaterIT extends EasyMockTest {
 
     storage.write(new NoResult.Quiet() {
       @Override
-      protected void execute(Storage.MutableStoreProvider storeProvider) {
+      public void execute(Storage.MutableStoreProvider storeProvider) {
         ILock lock = saveJobUpdate(storeProvider.getJobUpdateStore(), update, ROLLING_FORWARD);
         lockManager.releaseLock(lock);
       }


Mime
View raw message