aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java
public long startReplay(
        final long recordingId,
        final long position,
        final long length,
        final String replayChannel,
        final int replayStreamId)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.replay(
                recordingId,
                position,
                length,
                replayChannel,
                replayStreamId,
                correlationId,
                controlSessionId))
            {
                throw new ArchiveException("failed to send replay request");
            }

            return pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public long startReplay(
        final long recordingId,
        final long position,
        final long length,
        final String replayChannel,
        final int replayStreamId)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.replay(
                recordingId,
                position,
                length,
                replayChannel,
                replayStreamId,
                correlationId,
                controlSessionId))
            {
                throw new ArchiveException("failed to send replay request");
            }

            return pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public long startReplay ( final long recordingId , final long position , final long length , final String replayChannel , final int replayStreamId ) { lock . lock ( ) ; try { ensureOpen ( ) ; final long correlationId = aeron . nextCorrelationId ( ) ; if ( ! archiveProxy . replay ( recordingId , position , length , replayChannel , replayStreamId , correlationId , controlSessionId ) ) { throw new ArchiveException ( "failed to send replay request" ) ; } return pollForResponse ( correlationId ) ; } finally { lock . unlock ( ) ; } }
Start a replay for a length in bytes of a recording from a position. If the position is {@link #NULL_POSITION}
then the stream will be replayed from the start.
<p>
The lower 32-bits of the returned value contains the {@link Image#sessionId()} of the received replay. All
64-bits are required to uniquely identify the replay when calling {@link #stopReplay(long)}. The lower 32-bits
can be obtained by casting the {@code long} value to an {@code int}.

@param recordingId    to be replayed.
@param position       from which the replay should begin or {@link #NULL_POSITION} if from the start.
@param length         of the stream to be replayed. Use {@link Long#MAX_VALUE} to follow a live recording or
{@link #NULL_LENGTH} to replay the whole stream of unknown length.
@param replayChannel  to which the replay should be sent.
@param replayStreamId to which the replay should be sent.
@return the id of the replay session which will be the same as the {@link Image#sessionId()} of the received
replay for correlation with the matching channel and stream id in the lower 32 bits.
Start a replay for a length in bytes of a recording from a position . If the position is { @link #NULL_POSITION } then the stream will be replayed from the start . <p > The lower 32 - bits of the returned value contains the { @link Image#sessionId () } of the received replay . All 64 - bits are required to uniquely identify the replay when calling { @link #stopReplay ( long ) } . The lower 32 - bits can be obtained by casting the { @code long } value to an { @code int } .