类的使用
org.redkale.convert.Convert
-
使用Convert的程序包 程序包 说明 org.redkale.cluster.spi org.redkale.convert 提供数据的序列化和反解析功能org.redkale.convert.json 提供JSON的序列化和反解析功能org.redkale.convert.pb org.redkale.convert.spi org.redkale.mq MQ服务包org.redkale.mq.spi org.redkale.net.http HTTP协议包,提供HTTP协议服务器org.redkale.net.sncp SNCP协议包,提供SNCP协议服务器org.redkale.service Service接口和模式配置包org.redkale.source 数据源(数据库、缓存)操作包 -
-
org.redkale.cluster.spi中Convert的使用
参数类型为Convert的org.redkale.cluster.spi中的方法 修饰符和类型 方法 说明 void
HttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type type, Object obj)
void
HttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type valueType, HttpResult result)
void
HttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type type, RetResult ret)
void
HttpLocalRpcClient.HttpMessageLocalResponse. finishJson(Convert convert, Type type, Object obj)
-
org.redkale.convert中Convert的使用
org.redkale.convert中Convert的子类 修饰符和类型 类 说明 class
BinaryConvert<R extends Reader,W extends Writer>
二进制序列化/反序列化操作类class
TextConvert<R extends Reader,W extends Writer>
文本序列化/反序列化操作类声明为Convert的org.redkale.convert中的字段 修饰符和类型 字段 说明 protected Convert<R,W>
ConvertFactory. convert
返回Convert的org.redkale.convert中的方法 修饰符和类型 方法 说明 static Convert
ConvertFactory. findConvert(ConvertType type)
Convert
ConvertFactory. getConvert()
Convert<R,W>
Convert. newConvert(BiFunction<Attribute,Object,Object> objFieldFunc)
Convert<R,W>
Convert. newConvert(BiFunction<Attribute,Object,Object> objFieldFunc, BiFunction mapFieldFunc)
abstract Convert<R,W>
Convert. newConvert(BiFunction<Attribute,Object,Object> objFieldFunc, BiFunction mapFieldFunc, Function<Object,ConvertField[]> objExtFunc)
Convert<R,W>
Convert. newConvert(BiFunction<Attribute,Object,Object> objFieldFunc, Function<Object,ConvertField[]> objExtFunc)
-
org.redkale.convert.json中Convert的使用
org.redkale.convert.json中Convert的子类 修饰符和类型 类 说明 class
JsonConvert
详情见: https://redkale.org -
org.redkale.convert.pb中Convert的使用
org.redkale.convert.pb中Convert的子类 修饰符和类型 类 说明 class
ProtobufConvert
protobuf的Convert实现
注意:
1、 只实现proto3版本
2、 int统一使用sint32, long统一使用sint64
3、 集合统一 packed repeated
4、 目前使用的基础数据类型为:bool、sint32、sint64、float、double、bytes、string、map、Any -
org.redkale.convert.spi中Convert的使用
返回Convert的org.redkale.convert.spi中的方法 修饰符和类型 方法 说明 Convert
ConvertProvider. convert()
-
org.redkale.mq中Convert的使用
参数类型为Convert的org.redkale.mq中的方法 修饰符和类型 方法 说明 default CompletableFuture<Void>
MessageProducer. sendMessage(String topic, Integer partition, Convert convert, Object value)
CompletableFuture<Void>
MessageProducer. sendMessage(String topic, Integer partition, Convert convert, Type type, Object value)
default CompletableFuture<Void>
MessageProducer. sendMessage(String topic, Convert convert, Object value)
default CompletableFuture<Void>
MessageProducer. sendMessage(String topic, Convert convert, Type type, Object value)
-
org.redkale.mq.spi中Convert的使用
返回Convert的org.redkale.mq.spi中的方法 修饰符和类型 方法 说明 Convert
HttpMessageRequest. getRespConvert()
参数类型为Convert的org.redkale.mq.spi中的方法 修饰符和类型 方法 说明 <T> T
MessageRecord. convertFromContent(Convert convert, Type type)
void
HttpMessageResponse. finish(Convert convert, Type type, Object obj)
void
HttpMessageResponse. finish(Convert convert, Type type, HttpResult result)
void
HttpMessageResponse. finish(Convert convert, Type type, RetResult ret)
static void
HttpMessageResponse. finishHttpResult(boolean finest, Convert respConvert, Type type, MessageRecord msg, MessageClient messageClient, String respTopic, HttpResult result)
void
HttpMessageResponse. finishHttpResult(Convert respConvert, Type type, HttpResult result)
void
HttpMessageResponse. finishJson(Convert convert, Type type, Object obj)
CompletableFuture<Void>
MessageAgent.MessageProducerWrapper. sendMessage(String topic, Integer partition, Convert convert0, Type type, Object value)
参数类型为Convert的org.redkale.mq.spi中的构造器 构造器 说明 MessageProducerWrapper(MessageProducer producer, Convert convert)
-
org.redkale.net.http中Convert的使用
声明为Convert的org.redkale.net.http中的字段 修饰符和类型 字段 说明 protected Convert
WebSocketServlet. binaryConvert
protected Convert
HttpResult. convert
protected Convert
WebSocketServlet. jsonConvert
protected Convert
HttpRequest. reqConvert
protected Convert
HttpRequest. respConvert
protected Convert
WebSocketEngine. sendConvert
protected Convert
WebSocketNode. sendConvert
protected Convert
WebSocketServlet. sendConvert
protected Convert
WebSocketServlet. textConvert
返回Convert的org.redkale.net.http中的方法 修饰符和类型 方法 说明 Convert
HttpResult. convert()
protected Convert
WebSocket. getBinaryConvert()
protected Convert
HttpRequest. getRespConvert()
protected Convert
WebSocket. getSendConvert()
protected Convert
WebSocket. getTextConvert()
参数类型为Convert的org.redkale.net.http中的方法 修饰符和类型 方法 说明 CompletableFuture<Integer>
WebSocket. broadcastMessage(Convert convert, Object message)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocket. broadcastMessage(Convert convert, Object message, boolean last)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocket. broadcastMessage(WebSocketRange wsrange, Convert convert, Object message)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocket. broadcastMessage(WebSocketRange wsrange, Convert convert, Object message, boolean last)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocketNode. broadcastMessage(Convert convert, Object message)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocketNode. broadcastMessage(Convert convert, Object message0, boolean last)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocketNode. broadcastMessage(WebSocketRange wsrange, Convert convert, Object message)
广播消息, 给所有人发消息CompletableFuture<Integer>
WebSocketNode. broadcastMessage(WebSocketRange wsrange, Convert convert, Object message0, boolean last)
广播消息, 给所有人发消息HttpResult<T>
HttpResult. convert(Convert convert)
void
HttpResponse. finish(Convert convert, Object obj)
将结果对象输出void
HttpResponse. finish(Convert convert, Type type, Object obj)
将结果对象输出void
HttpResponse. finish(Convert convert, Type resultType, HttpResult result)
将HttpResult对象输出void
HttpResponse. finish(Convert convert, Type type, RetResult ret)
将RetResult对象输出void
HttpResponse. finish(Convert convert, HttpScope result)
将HttpScope对象输出void
HttpResponse. finishFuture(Convert convert, Type valueType, CompletionStage future)
将CompletionStage对象输出void
HttpResponse. finishJson(Convert convert, Object obj)
将对象以JSON格式输出void
HttpResponse. finishJson(Convert convert, Type type, Object obj)
将对象以JSON格式输出void
HttpResponse. finishJsonFuture(Convert convert, Type valueType, CompletionStage future)
将CompletionStage对象输出void
HttpResponse. finishPublisher(Convert convert, Type valueType, Object publisher)
将第三方类Flow.Publisher对象(如: Mono/Flux)输出<T> void
HttpResponse. finishPublisher(Convert convert, Type valueType, Flow.Publisher<T> publisher)
将Flow.Publisher对象输出void
HttpResponse. finishScopeFuture(Convert convert, CompletionStage<HttpScope> future)
将HttpScope对象输出CompletableFuture<HttpResult<byte[]>>
WebClient. getAsync(String url, byte[] body, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. getAsync(String url, String body, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. getAsync(String url, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. getAsync(String url, HttpHeaders headers, Convert convert, Type valueType)
<T> T
HttpRequest. getBodyJson(Convert convert, Type type)
获取请求内容的JavaBean对象CompletableFuture<HttpResult<byte[]>>
WebClient. postAsync(String url, byte[] body, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. postAsync(String url, String body, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. postAsync(String url, Convert convert, Type valueType)
CompletableFuture<HttpResult<byte[]>>
WebClient. postAsync(String url, HttpHeaders headers, Convert convert, Type valueType)
void
HttpRender. renderTo(HttpRequest request, HttpResponse response, Convert convert, HttpScope scope)
CompletableFuture<Integer>
WebSocket. send(Convert convert, Object message)
给自身发送消息, 消息类型是JavaBean对象CompletableFuture<Integer>
WebSocket. send(Convert convert, Object message, boolean last)
给自身发送消息, 消息类型是JavaBean对象<T> CompletableFuture<HttpResult<T>>
WebClient. sendAsync(String method, String url, HttpHeaders headers, byte[] body, Convert convert, Type valueType)
CompletableFuture<Integer>
WebSocket. sendMessage(Convert convert, Object message, boolean last, Serializable... userids)
给指定userid的WebSocket节点发送 二进制消息/文本消息/JavaBean对象消息CompletableFuture<Integer>
WebSocket. sendMessage(Convert convert, Object message, boolean last, Stream<G> userids)
给指定userid的WebSocket节点发送 二进制消息/文本消息/JavaBean对象消息CompletableFuture<Integer>
WebSocket. sendMessage(Convert convert, Object message, G... userids)
给指定userid的WebSocket节点发送 二进制消息/文本消息/JavaBean对象消息CompletableFuture<Integer>
WebSocket. sendMessage(Convert convert, Object message, Stream<G> userids)
给指定userid的WebSocket节点发送 二进制消息/文本消息/JavaBean对象消息CompletableFuture<Integer>
WebSocketNode. sendMessage(Convert convert, Object message0, boolean last, Serializable... userids)
向指定用户发送消息,先发送本地连接,再发送远程连接
如果当前WebSocketNode是远程模式,此方法只发送远程连接CompletableFuture<Integer>
WebSocketNode. sendMessage(Convert convert, Object message0, boolean last, Stream<? extends Serializable> userids)
向指定用户发送消息,先发送本地连接,再发送远程连接
如果当前WebSocketNode是远程模式,此方法只发送远程连接CompletableFuture<Integer>
WebSocketNode. sendMessage(Convert convert, Object message0, boolean last, WebSocketUserAddress... useraddrs)
向指定用户发送消息,先发送本地连接,再发送远程连接
如果当前WebSocketNode是远程模式,此方法只发送远程连接CompletableFuture<Integer>
WebSocketNode. sendMessage(Convert convert, Object message, Serializable... useridOrAddrs)
向指定用户发送消息,先发送本地连接,再发送远程连接
如果当前WebSocketNode是远程模式,此方法只发送远程连接CompletableFuture<Integer>
WebSocketNode. sendMessage(Convert convert, Object message, Stream<? extends Serializable> useridOrAddrs)
向指定用户发送消息,先发送本地连接,再发送远程连接
如果当前WebSocketNode是远程模式,此方法只发送远程连接protected void
WebSocket. setBinaryConvert(Convert convert)
protected void
WebSocket. setSendConvert(Convert convert)
protected void
WebSocket. setTextConvert(Convert convert)
参数类型为Convert的org.redkale.net.http中的构造器 构造器 说明 HttpResult(Convert convert, T result)
WebSocketEngine(String engineid, boolean single, HttpContext context, int liveInterval, int wsMaxConns, int wsThreads, int wsMaxBody, Cryptor cryptor, WebSocketNode node, Convert sendConvert, Logger logger)
-
org.redkale.net.sncp中Convert的使用
返回Convert的org.redkale.net.sncp中的方法 修饰符和类型 方法 说明 Convert
SncpRequest. getConvert()
-
org.redkale.service中Convert的使用
声明为Convert的org.redkale.service中的字段 修饰符和类型 字段 说明 protected Convert
RetResult. convert
返回Convert的org.redkale.service中的方法 修饰符和类型 方法 说明 Convert
RetResult. clearConvert()
Convert
RetResult. convert()
参数类型为Convert的org.redkale.service中的方法 修饰符和类型 方法 说明 RetResult
RetResult. convert(Convert convert)
参数类型为Convert的org.redkale.service中的构造器 构造器 说明 RetResult(Convert convert, T result)
-
org.redkale.source中Convert的使用
参数类型为Convert的org.redkale.source中的方法 修饰符和类型 方法 说明 void
CacheMemorySource.CacheEntry. addSsetValue(Convert convert, Type type, Object value)
<T> T
CacheMemorySource.CacheEntry. getMapValue(String field, Convert convert, Type type)
<T> T
CacheMemorySource.CacheEntry. getObjectValue(Convert convert, Type type)
<T> T
CacheMemorySource. getSet(String key, Convert convert, Type type, T value)
default <T> T
CacheSource. getSet(String key, Convert convert, Type type, T value)
<T> CompletableFuture<T>
CacheMemorySource. getSetAsync(String key, Convert convert, Type type, T value)
<T> CompletableFuture<T>
CacheSource. getSetAsync(String key, Convert convert, Type type, T value)
<T> void
CacheMemorySource. hset(String key, String field, Convert convert, Type type, T value)
default <T> void
CacheSource. hset(String key, String field, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheMemorySource. hsetAsync(String key, String field, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheSource. hsetAsync(String key, String field, Convert convert, Type type, T value)
<T> boolean
CacheMemorySource. hsetnx(String key, String field, Convert convert, Type type, T value)
default <T> boolean
CacheSource. hsetnx(String key, String field, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheMemorySource. hsetnxAsync(String key, String field, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheSource. hsetnxAsync(String key, String field, Convert convert, Type type, T value)
static Serializable
CacheMemorySource.CacheEntry. objToSerial(Convert convert, Type type, Object value)
<T> void
CacheMemorySource. psetex(String key, long milliSeconds, Convert convert, Type type, T value)
default <T> void
CacheSource. psetex(String key, long milliSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheMemorySource. psetexAsync(String key, long milliSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheSource. psetexAsync(String key, long milliSeconds, Convert convert, Type type, T value)
default <T> int
CacheSource. publish(String topic, Convert convert, Type messageType, T message)
default <T> int
CacheSource. publish(String topic, Convert convert, T message)
default <T> CompletableFuture<Integer>
CacheSource. publishAsync(String topic, Convert convert, Type messageType, T message)
default <T> CompletableFuture<Integer>
CacheSource. publishAsync(String topic, Convert convert, T message)
static <T> T
CacheMemorySource.CacheEntry. serialToObj(Convert convert, Type type, Serializable value)
<T> void
CacheMemorySource. set(String key, Convert convert, Type type, T value)
default <T> void
CacheSource. set(int expireSeconds, String key, Convert convert, Type type, T value)
已过时。default <T> void
CacheSource. set(int expireSeconds, String key, Convert convert, T value)
已过时。default <T> void
CacheSource. set(String key, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheMemorySource. setAsync(String key, Convert convert, Type type, T value)
default <T> CompletableFuture<Void>
CacheSource. setAsync(int expireSeconds, String key, Convert convert, Type type, T value)
已过时。default <T> CompletableFuture<Void>
CacheSource. setAsync(int expireSeconds, String key, Convert convert, T value)
已过时。<T> CompletableFuture<Void>
CacheSource. setAsync(String key, Convert convert, Type type, T value)
<T> void
CacheMemorySource. setex(String key, int expireSeconds, Convert convert, Type type, T value)
default <T> void
CacheSource. setex(String key, int expireSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheMemorySource. setexAsync(String key, int expireSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Void>
CacheSource. setexAsync(String key, int expireSeconds, Convert convert, Type type, T value)
void
CacheMemorySource.CacheEntry. setMapValue(String field, Convert convert, Type type, Object value)
Object
CacheMemorySource.CacheEntry. setMapValueIfAbsent(String field, Convert convert, Type type, Object value)
<T> boolean
CacheMemorySource. setnx(String key, Convert convert, Type type, T value)
default <T> boolean
CacheSource. setnx(String key, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheMemorySource. setnxAsync(String key, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheSource. setnxAsync(String key, Convert convert, Type type, T value)
<T> boolean
CacheMemorySource. setnxex(String key, int expireSeconds, Convert convert, Type type, T value)
default <T> boolean
CacheSource. setnxex(String key, int expireSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheMemorySource. setnxexAsync(String key, int expireSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheSource. setnxexAsync(String key, int expireSeconds, Convert convert, Type type, T value)
<T> boolean
CacheMemorySource. setnxpx(String key, long milliSeconds, Convert convert, Type type, T value)
default <T> boolean
CacheSource. setnxpx(String key, long milliSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheMemorySource. setnxpxAsync(String key, long milliSeconds, Convert convert, Type type, T value)
<T> CompletableFuture<Boolean>
CacheSource. setnxpxAsync(String key, long milliSeconds, Convert convert, Type type, T value)
void
CacheMemorySource.CacheEntry. setObjectValue(Convert convert, Type type, Object value)
default <T> void
CacheSource. subscribe(Convert convert, Type messageType, CacheEventListener<T> listener, String... topics)
default <T> CompletableFuture<Void>
CacheSource. subscribeAsync(Convert convert, Type messageType, CacheEventListener<T> listener, String... topics)
-