You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "bdeggleston (via GitHub)" <gi...@apache.org> on 2023/02/14 21:58:47 UTC

[GitHub] [cassandra] bdeggleston commented on a diff in pull request #2144: CEP-15 Accord: Immutable state integration

bdeggleston commented on code in PR #2144:
URL: https://github.com/apache/cassandra/pull/2144#discussion_r1106423757


##########
src/java/org/apache/cassandra/service/accord/AccordStateCache.java:
##########
@@ -51,71 +55,107 @@
 {
     private static final Logger logger = LoggerFactory.getLogger(AccordStateCache.class);
 
-    private static class WriteOnlyGroup<K, V extends AccordState<K>>
+    public interface LoadFunction<K, V>
     {
-        private boolean locked = false;
-        private List<AccordState.WriteOnly<K, V>> items = new ArrayList<>();
+        AsyncResult<Void> apply(K key, Consumer<V> valueConsumer);

Review Comment:
   We need an AsyncResult in this case because we need to check if the operation has completed.



-- 
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-unsubscribe@cassandra.apache.org

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


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