aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java
public void truncateRecording(final long recordingId, final long position)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.truncateRecording(recordingId, position, correlationId, controlSessionId))
            {
                throw new ArchiveException("failed to send truncate recording request");
            }

            pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public void truncateRecording(final long recordingId, final long position)
    {
        lock.lock();
        try
        {
            ensureOpen();

            final long correlationId = aeron.nextCorrelationId();

            if (!archiveProxy.truncateRecording(recordingId, position, correlationId, controlSessionId))
            {
                throw new ArchiveException("failed to send truncate recording request");
            }

            pollForResponse(correlationId);
        }
        finally
        {
            lock.unlock();
        }
    }
public void truncateRecording ( final long recordingId , final long position ) { lock . lock ( ) ; try { ensureOpen ( ) ; final long correlationId = aeron . nextCorrelationId ( ) ; if ( ! archiveProxy . truncateRecording ( recordingId , position , correlationId , controlSessionId ) ) { throw new ArchiveException ( "failed to send truncate recording request" ) ; } pollForResponse ( correlationId ) ; } finally { lock . unlock ( ) ; } }
Truncate a stopped recording to a given position that is less than the stopped position. The provided position
must be on a fragment boundary. Truncating a recording to the start position effectively deletes the recording.

@param recordingId of the stopped recording to be truncated.
@param position    to which the recording will be truncated.
Truncate a stopped recording to a given position that is less than the stopped position . The provided position must be on a fragment boundary . Truncating a recording to the start position effectively deletes the recording .