![JAR search and dependency download from the Maven repository](/logo.png)
com.gitee.yanfanvip.model.ReciveEnum 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;
import java.io.DataInputStream;
import java.io.IOException;
public enum ReciveEnum {
PING(5),
PULLDATA(6),
SYNC(7);
private final int type;
private ReciveEnum(int type) {
this.type = type;
}
public int getType() {
return type;
}
public static ReciveEnum get(int type) {
for (ReciveEnum e : ReciveEnum.values()) {
if(e.type == type){
return e;
}
}
return null;
}
public static ReciveEnum get(DataInputStream in) throws IOException {
int type = in.readInt();
for (ReciveEnum e : ReciveEnum.values()) {
if(e.type == type){
return e;
}
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy