docs: private synchronized void changeState(PrimitiveState state) {
      if (this.state != state) {
        this.state = state;
        stateChangeListeners.forEach(l -> threadContext.execute(() -> l.accept(state)));
      }
    }