code: public void registerRecordAvailabilityListener(final RecordAvailabilityListener<T> listener) {
  		if (!this.recordAvailabilityListener.compareAndSet(null, listener)) {
  			throw new IllegalStateException(this.recordAvailabilityListener
  				+ " is already registered as a record availability listener");
  		}
  	}
docs: Registers a {@link RecordAvailabilityListener} with this input gate.
  
  @param listener
  the listener object to be registered