Remove calls to deprecated MoreExecutors.sameThreadExecutor master
authorKenneth McFarland <kennethpaulmcfarland@gmail.com>
Sat, 21 Oct 2017 04:05:12 +0000 (21:05 -0700)
committerKenneth McFarland <kennethpaulmcfarland@gmail.com>
Sat, 21 Oct 2017 04:05:12 +0000 (21:05 -0700)
curator-framework/src/main/java/org/apache/curator/framework/listen/ListenerContainer.java
curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/InterProcessMutex.java
curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/QueueBuilder.java
curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java

index 549ed81..fd4497a 100644 (file)
@@ -38,7 +38,7 @@ public class ListenerContainer<T> implements Listenable<T>
     @Override
     public void addListener(T listener)
     {
-        addListener(listener, MoreExecutors.sameThreadExecutor());
+        addListener(listener, MoreExecutors.directExecutor());
     }
 
     @Override
index 08b8ba1..77ef685 100644 (file)
@@ -173,7 +173,7 @@ public class InterProcessMutex implements InterProcessLock, Revocable<InterProce
     @Override
     public void makeRevocable(RevocationListener<InterProcessMutex> listener)
     {
-        makeRevocable(listener, MoreExecutors.sameThreadExecutor());
+        makeRevocable(listener, MoreExecutors.directExecutor());
     }
 
     @Override
index a571578..39ba192 100644 (file)
@@ -187,7 +187,7 @@ public class QueueBuilder<T>
     }
 
     /**
-     * Change the executor used. The default is {@link MoreExecutors#sameThreadExecutor()}
+     * Change the executor used. The default is {@link MoreExecutors#directExectutor()}
      *
      * @param executor new executor to use
      * @return this
@@ -269,6 +269,6 @@ public class QueueBuilder<T>
         this.queuePath = PathUtils.validatePath(queuePath);
 
         factory = defaultThreadFactory;
-        executor = MoreExecutors.sameThreadExecutor();
+        executor = MoreExecutors.directExecutor();
     }
 }
index 6375bdf..8ae9072 100644 (file)
@@ -119,7 +119,7 @@ public class SharedCount implements Closeable, SharedCountReader, Listenable<Sha
     @Override
     public void     addListener(SharedCountListener listener)
     {
-        addListener(listener, MoreExecutors.sameThreadExecutor());
+        addListener(listener, MoreExecutors.directExecutor());
     }
 
     @Override