A Monolithically Integrated All-Optical Regenerator for NRZ and RZ Signals