public void complete() {
        if (!this.state.compareAndSet(State.ACCUMULATING, State.COMPLETING)) {
            return;
        }

        // perform final changes
        if (!this.meta.containsKey(Weight.NODE_KEY) && !this.weight.isNull()) {
            this.meta.put(Weight.NODE_KEY, StringResult.of(String.valueOf(this.weight.intResult())));
        }
        if (this.primaryGroup != null && !this.meta.containsKey("primarygroup")) {
            this.meta.put("primarygroup", StringResult.of(this.primaryGroup));
        }
        this.seenNodeKeys = null; // free up for GC

        this.state.set(State.COMPLETE);
    }
"Completes" the accumulator, preventing any further changes.

Also performs some final processing on the accumulators state, before
data is read.
common/src/main/java/me/lucko/luckperms/common/cacheddata/type/MetaAccumulator.java