BewareMyPower commented on pull request #14346:
URL: https://github.com/apache/pulsar/pull/14346#issuecomment-1044232229
You can use following code to check if the previous doesn't exist as I've
said.
```java
final AtomicBoolean computed = new AtomicBoolean(false);
map.computeIfAbsent("A", __ -> {
computed.set(true); // it's true only when the value is computed
return newValue();
});
```
--
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]