code: synchronized public void setEnableSessionCreation(boolean flag) {
          enableSessionCreation = flag;
  
          if ((handshaker != null) && !handshaker.activated()) {
              handshaker.setEnableSessionCreation(enableSessionCreation);
          }
      }
docs: Controls whether new connections may cause creation of new SSL
  sessions.
  
  As long as handshaking has not started, we can change
  whether we enable session creations.  Otherwise,
  we will need to wait for the next handshake.