docs: public void setState(PrimitiveState state) {
      if (this.state != state) {
        if (this.state != PrimitiveState.EXPIRED && this.state != PrimitiveState.CLOSED) {
          this.state = state;
          if (state == PrimitiveState.SUSPENDED) {
            if (suspendedTime == null) {
              suspendedTime = System.currentTimeMillis();
            }
          } else {
            suspendedTime = null;
          }
          changeListeners.forEach(l -> l.accept(state));
        }
      } else if (this.state == PrimitiveState.SUSPENDED) {
        if (System.currentTimeMillis() - suspendedTime > timeout) {
          setState(PrimitiveState.EXPIRED);
        }
      }
    }