public ExclusivePublication addRecordedExclusivePublication(final String channel, final int streamId) {
    """
	Add an {@link ExclusivePublication} and set it up to be recorded.
	<p>
	This is a sessionId specific recording.
	
	@param channel  for the publication.
	@param streamId for the publication.
	@return the {@link ExclusivePublication} ready for use.
    """
        ExclusivePublication publication = null;
        lock.lock();
        try
        {
            ensureOpen();

            publication = aeron.addExclusivePublication(channel, streamId);
            startRecording(ChannelUri.addSessionId(channel, publication.sessionId()), streamId, SourceLocation.LOCAL);
        }
        catch (final RuntimeException ex)
        {
            CloseHelper.quietClose(publication);
            throw ex;
        }
        finally
        {
            lock.unlock();
        }

        return publication;
    }
public ExclusivePublication addRecordedExclusivePublication(final String channel, final int streamId)
    {
        ExclusivePublication publication = null;
        lock.lock();
        try
        {
            ensureOpen();

            publication = aeron.addExclusivePublication(channel, streamId);
            startRecording(ChannelUri.addSessionId(channel, publication.sessionId()), streamId, SourceLocation.LOCAL);
        }
        catch (final RuntimeException ex)
        {
            CloseHelper.quietClose(publication);
            throw ex;
        }
        finally
        {
            lock.unlock();
        }

        return publication;
    }
public ExclusivePublication addRecordedExclusivePublication ( final String channel , final int streamId ) { ExclusivePublication publication = null ; lock . lock ( ) ; try { ensureOpen ( ) ; publication = aeron . addExclusivePublication ( channel , streamId ) ; startRecording ( ChannelUri . addSessionId ( channel , publication . sessionId ( ) ) , streamId , SourceLocation . LOCAL ) ; } catch ( final RuntimeException ex ) { CloseHelper . quietClose ( publication ) ; throw ex ; } finally { lock . unlock ( ) ; } return publication ; }
Add an {@link ExclusivePublication} and set it up to be recorded.
<p>
This is a sessionId specific recording.

@param channel  for the publication.
@param streamId for the publication.
@return the {@link ExclusivePublication} ready for use.
Add an { @link ExclusivePublication } and set it up to be recorded . <p > This is a sessionId specific recording .