package com.fr.plugin.db.redis.core.script; /** * @author richie * @version 10.0 * Created by richie on 2019-09-18 */ public enum EngineType { V8(0), JAVA(1); private int index; EngineType(int index) { this.index = index; } public int getType() { return index; } public static EngineType parse(int type) { for (EngineType engineType : values()) { if (engineType.index == type) { return engineType; } } return V8; } }