com.gitee.yanfanvip.model.OptionsEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rocksdb Show documentation
Show all versions of rocksdb Show documentation
RocksDB Cluster and Replication cluster
The newest version!
package com.gitee.yanfanvip.model;
public enum OptionsEnum {
PUT(1),
PUTALL(2),
REMOVE(3),
CLEAR(4);
private final int type;
private OptionsEnum(int type) {
this.type = type;
}
public int getType() {
return type;
}
public static OptionsEnum get(int type) {
for (OptionsEnum e : OptionsEnum.values()) {
if(e.type == type){
return e;
}
}
return null;
}
}