aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java
public ChannelUriStringBuilder initialPosition(final long position, final int initialTermId, final int termLength)
    {
        if (position < 0 || 0 != (position & (FRAME_ALIGNMENT - 1)))
        {
            throw new IllegalArgumentException("invalid position: " + position);
        }

        final int bitsToShift = LogBufferDescriptor.positionBitsToShift(termLength);

        this.initialTermId = initialTermId;
        this.termId = LogBufferDescriptor.computeTermIdFromPosition(position, bitsToShift, initialTermId);
        this.termOffset = (int)(position & (termLength - 1));
        this.termLength = termLength;

        return this;
    }
public ChannelUriStringBuilder initialPosition(final long position, final int initialTermId, final int termLength)
    {
        if (position < 0 || 0 != (position & (FRAME_ALIGNMENT - 1)))
        {
            throw new IllegalArgumentException("invalid position: " + position);
        }

        final int bitsToShift = LogBufferDescriptor.positionBitsToShift(termLength);

        this.initialTermId = initialTermId;
        this.termId = LogBufferDescriptor.computeTermIdFromPosition(position, bitsToShift, initialTermId);
        this.termOffset = (int)(position & (termLength - 1));
        this.termLength = termLength;

        return this;
    }
public ChannelUriStringBuilder initialPosition ( final long position , final int initialTermId , final int termLength ) { if ( position < 0 || 0 != ( position & ( FRAME_ALIGNMENT - 1 ) ) ) { throw new IllegalArgumentException ( "invalid position: " + position ) ; } final int bitsToShift = LogBufferDescriptor . positionBitsToShift ( termLength ) ; this . initialTermId = initialTermId ; this . termId = LogBufferDescriptor . computeTermIdFromPosition ( position , bitsToShift , initialTermId ) ; this . termOffset = ( int ) ( position & ( termLength - 1 ) ) ; this . termLength = termLength ; return this ; }
Initialise a channel for restarting a publication at a given position.

@param position      at which the publication should be started.
@param initialTermId what which the stream would start.
@param termLength    for the stream.
@return this for a fluent API.
Initialise a channel for restarting a publication at a given position .