@Override
    public int compareTo(final LogId o) {
        // Compare term at first
        final int c = Long.compare(getTerm(), o.getTerm());
        if (c == 0) {
            return Long.compare(getIndex(), o.getIndex());
        } else {
            return c;
        }
    }
Log identifier.

@author boyan (boyan@alibaba-inc.com)

2018-Mar-12 3:12:29 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/entity/LogId.java