private final @NonNull DataTreeConfiguration treeConfig;
+ @SuppressWarnings("unused")
private volatile ImmutableMap<PathArgument, ModificationApplyOperation> children = ImmutableMap.of();
DataNodeContainerModificationStrategy(final NormalizedNodeContainerSupport<?, ?> support, final T schema,
@Override
public final ModificationApplyOperation childByArg(final PathArgument arg) {
- final var local = children;
+ final var local = (ImmutableMap<PathArgument, ModificationApplyOperation>) CHILDREN.getAcquire(this);
final var existing = local.get(arg);
if (existing != null) {
return existing;
// Attempt to install the updated map
final var witness = (ImmutableMap<PathArgument, ModificationApplyOperation>)
- CHILDREN.compareAndExchange(this, previous, updated);
+ CHILDREN.compareAndExchangeRelease(this, previous, updated);
if (witness == previous) {
return computed;
}