aeron-client/src/main/java/io/aeron/logbuffer/LogBufferDescriptor.java
public static boolean casRawTail(
        final UnsafeBuffer metadataBuffer,
        final int partitionIndex,
        final long expectedRawTail,
        final long updateRawTail)
    {
        final int index = TERM_TAIL_COUNTERS_OFFSET + (SIZE_OF_LONG * partitionIndex);
        return metadataBuffer.compareAndSetLong(index, expectedRawTail, updateRawTail);
    }
public static boolean casRawTail(
        final UnsafeBuffer metadataBuffer,
        final int partitionIndex,
        final long expectedRawTail,
        final long updateRawTail)
    {
        final int index = TERM_TAIL_COUNTERS_OFFSET + (SIZE_OF_LONG * partitionIndex);
        return metadataBuffer.compareAndSetLong(index, expectedRawTail, updateRawTail);
    }
Compare and set the raw value of the tail for the given partition.

@param metadataBuffer  containing the tail counters.
@param partitionIndex  for the tail counter.
@param expectedRawTail expected current value.
@param updateRawTail   to be applied.
@return true if the update was successful otherwise false.