use of com.jn.agileway.codec.serialization.bson.BsonCodec in project agileway by fangjinuo.
the class RedisTemplates method newCodec.
public static Codec newCodec(BuiltinCodecType codecType) {
codecType = codecType == null ? BuiltinCodecType.EASYJSON : codecType;
Codec codec = null;
switch(codecType) {
case JSCKSON:
codec = new JacksonCodec();
break;
case JDK:
codec = new JdkCodec();
break;
case KRYO:
codec = new KryoCodec();
break;
case HESSIAN:
codec = new HessianCodec();
break;
case PROTOSTUFF:
codec = new ProtostuffCodec();
break;
case FSE:
codec = new FseCodec();
break;
case FST:
codec = new FstCodec();
break;
case CBOR:
codec = new CborJacksonCodec();
break;
case MSGPACK:
codec = new MsgPackCodec();
break;
case XSON:
codec = new XsonCodec();
break;
case BSON:
codec = new BsonCodec();
break;
case EASYJSON:
default:
codec = new EasyjsonCodec();
break;
}
return codec;
}
Aggregations