belliottsmith commented on code in PR #4264:
URL: https://github.com/apache/cassandra/pull/4264#discussion_r2224987261


##########
src/java/org/apache/cassandra/service/accord/AccordCacheEntry.java:
##########
@@ -288,71 +319,34 @@ void notifyListeners(BiConsumer<AccordCache.Listener<K, 
V>, AccordCacheEntry<K,
         owner.notifyListeners(notify, this);
     }
 
-    public interface OnLoaded
+    public interface LoadExecutor<P1, P2>
     {
-        <K, V> void onLoaded(AccordCacheEntry<K, V> state, V value, Throwable 
fail);
+        <K, V> Cancellable load(P1 p1, P2 p2, AccordCacheEntry<K, V> entry);
+    }
 
-        static OnLoaded immediate()
+    // functions as both an identity object, and a register of listeners
+    public static class UniqueSave
+    {
+        @Nullable List<Runnable> onSuccess;
+        void onSuccess(Runnable onSuccess)

Review Comment:
   It's all done under mutual exclusion while holding the executor lock.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to