aeron-client/src/main/java/io/aeron/logbuffer/LogBufferDescriptor.java
public static boolean casActiveTermCount(
        final UnsafeBuffer metadataBuffer, final int expectedTermCount, final int updateTermCount)
    {
        return metadataBuffer.compareAndSetInt(LOG_ACTIVE_TERM_COUNT_OFFSET, expectedTermCount, updateTermCount);
    }
public static boolean casActiveTermCount(
        final UnsafeBuffer metadataBuffer, final int expectedTermCount, final int updateTermCount)
    {
        return metadataBuffer.compareAndSetInt(LOG_ACTIVE_TERM_COUNT_OFFSET, expectedTermCount, updateTermCount);
    }
Compare and set the value of the current active term count.

@param metadataBuffer    containing the meta data.
@param expectedTermCount value of the active term count expected in the log
@param updateTermCount   value of the active term count to be updated in the log
@return true if successful otherwise false.