code: public KryoInstantiator setRegistrationRequired(final boolean req) {
      return new KryoInstantiator() {
        public Kryo newKryo() {
          Kryo k = KryoInstantiator.this.newKryo();
          /** Try to avoid calling this method if you don't need to.
           * We've been burned by binary compatibility with Kryo
           */
          if(k.isRegistrationRequired() != req) { k.setRegistrationRequired(req); }
          return k;
        }
      };
    }
docs: If true, Kryo will error if it sees a class that has not been registered