aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java
public long findLastMatchingRecording(
        final long minRecordingId, final String channelFragment, final int streamId, final int sessionId)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.findLastMatchingRecording(
                minRecordingId, channelFragment, streamId, sessionId, correlationId, controlSessionId))
            {
                throw new ArchiveException("failed to send find last matching recording request");
            }

            return pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public long findLastMatchingRecording(
        final long minRecordingId, final String channelFragment, final int streamId, final int sessionId)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.findLastMatchingRecording(
                minRecordingId, channelFragment, streamId, sessionId, correlationId, controlSessionId))
            {
                throw new ArchiveException("failed to send find last matching recording request");
            }

            return pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public long findLastMatchingRecording ( final long minRecordingId , final String channelFragment , final int streamId , final int sessionId ) { lock . lock ( ) ; try { ensureOpen ( ) ; final long correlationId = aeron . nextCorrelationId ( ) ; if ( ! archiveProxy . findLastMatchingRecording ( minRecordingId , channelFragment , streamId , sessionId , correlationId , controlSessionId ) ) { throw new ArchiveException ( "failed to send find last matching recording request" ) ; } return pollForResponse ( correlationId ) ; } finally { lock . unlock ( ) ; } }
Find the last recording that matches the given criteria.

@param minRecordingId  to search back to.
@param channelFragment for a contains match on the original channel stored with the archive descriptor.
@param streamId        of the recording to match.
@param sessionId       of the recording to match.
@return the recordingId if found otherwise {@link Aeron#NULL_VALUE} if not found.
Find the last recording that matches the given criteria .