public byte toByte() {
        switch (this) {
            case SET:
                return (byte) 0;
            case CAS:
                return (byte) 1;
            case INC:
                return (byte) 2;
            case GET:
                return (byte) 3;
        }
        throw new IllegalArgumentException();
    }
command type
@author boyan (boyan@alibaba-inc.com)

2018-Apr-25 1:34:15 PM
jraft-test/src/main/java/com/alipay/sofa/jraft/test/atomic/server/CommandType.java