tolbertam commented on code in PR #2003:
URL:
https://github.com/apache/cassandra-java-driver/pull/2003#discussion_r1938345747
##########
core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java:
##########
@@ -53,23 +58,73 @@
public class CqlPrepareAsyncProcessor
implements RequestProcessor<PrepareRequest,
CompletionStage<PreparedStatement>> {
+ public class CacheEntry {
+
+ private CompletableFuture<PreparedStatement> result;
+ private Set<CompletableFuture<PreparedStatement>> futures;
+ private AtomicBoolean lock;
+
+ public CacheEntry() {
+
+ result = new CompletableFuture<>();
+ futures = Sets.newHashSet(result);
+ lock = new AtomicBoolean(false);
+ }
Review Comment:
Small nit: could probably simplify this by initializing all of these in the
variable declaration and then getting rid of the constructor. Should also make
these fields all final.
--
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]