dcapwell commented on code in PR #28:
URL: https://github.com/apache/cassandra-accord/pull/28#discussion_r1089394273


##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -576,15 +576,25 @@ public <T> Future<T> submit(PreLoadContext context, 
Function<? super SafeCommand
 
         public SingleThread(int id, NodeTimeService time, Agent agent, 
DataStore store, ProgressLog.Factory progressLogFactory, RangesForEpochHolder 
rangesForEpoch)
         {
-            super(id);
-            executor = Executors.newSingleThreadExecutor(r -> {
+            this(id, time, agent, store, progressLogFactory, rangesForEpoch, 
Executors.newSingleThreadExecutor(r -> {
                 Thread thread = new Thread(r);
                 thread.setName(CommandStore.class.getSimpleName() + '[' + 
time.id() + ']');
                 return thread;
-            });
+            }));
+        }
+
+        private SingleThread(int id, NodeTimeService time, Agent agent, 
DataStore store, ProgressLog.Factory progressLogFactory, RangesForEpochHolder 
rangesForEpoch, ExecutorService executor)

Review Comment:
   name may not make sense in this case, 100% cool making a base type such as 
`ExecutorCommandStore` and have `SingleThread` extend it and use the existing 
logic to build the single threaded executor



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to