class PipelinedSubpartition extends ResultSubpartition {

	boolean registerListener(NotificationListener listener) {
		synchronized (buffers) {
			if (!buffers.isEmpty() || isReleased) {
				return false;
			}

			if (registeredListener == null) {
				registeredListener = listener;

				return true;
			}

			throw new IllegalStateException("Already registered listener.");
		}
	}

	  PipelinedSubpartition(int index, ResultPartition parent);

}