类的使用
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中的方法 修饰符和类型 方法 说明 voidHttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type type, Object obj)voidHttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type valueType, HttpResult result)voidHttpLocalRpcClient.HttpMessageLocalResponse. finish(Convert convert, Type type, RetResult ret)voidHttpLocalRpcClient.HttpMessageLocalResponse. finishJson(Convert convert, Type type, Object obj) -
org.redkale.convert中Convert的使用
org.redkale.convert中Convert的子类 修饰符和类型 类 说明 classBinaryConvert<R extends Reader,W extends Writer>二进制序列化/反序列化操作类classTextConvert<R extends Reader,W extends Writer>文本序列化/反序列化操作类声明为Convert的org.redkale.convert中的字段 修饰符和类型 字段 说明 protected Convert<R,W>ConvertFactory. convert返回Convert的org.redkale.convert中的方法 修饰符和类型 方法 说明 static ConvertConvertFactory. findConvert(ConvertType type)ConvertConvertFactory. 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的子类 修饰符和类型 类 说明 classJsonConvert详情见: https://redkale.org -
org.redkale.convert.pb中Convert的使用
org.redkale.convert.pb中Convert的子类 修饰符和类型 类 说明 classProtobufConvertprotobuf的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中的方法 修饰符和类型 方法 说明 ConvertConvertProvider. 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中的方法 修饰符和类型 方法 说明 ConvertHttpMessageRequest. getRespConvert()参数类型为Convert的org.redkale.mq.spi中的方法 修饰符和类型 方法 说明 <T> TMessageRecord. convertFromContent(Convert convert, Type type)voidHttpMessageResponse. finish(Convert convert, Type type, Object obj)voidHttpMessageResponse. finish(Convert convert, Type type, HttpResult result)voidHttpMessageResponse. finish(Convert convert, Type type, RetResult ret)static voidHttpMessageResponse. finishHttpResult(boolean finest, Convert respConvert, Type type, MessageRecord msg, MessageClient messageClient, String respTopic, HttpResult result)voidHttpMessageResponse. finishHttpResult(Convert respConvert, Type type, HttpResult result)voidHttpMessageResponse. 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 ConvertWebSocketServlet. binaryConvertprotected ConvertHttpResult. convertprotected ConvertWebSocketServlet. jsonConvertprotected ConvertHttpRequest. reqConvertprotected ConvertHttpRequest. respConvertprotected ConvertWebSocketEngine. sendConvertprotected ConvertWebSocketNode. sendConvertprotected ConvertWebSocketServlet. sendConvertprotected ConvertWebSocketServlet. textConvert返回Convert的org.redkale.net.http中的方法 修饰符和类型 方法 说明 ConvertHttpResult. convert()protected ConvertWebSocket. getBinaryConvert()protected ConvertHttpRequest. getRespConvert()protected ConvertWebSocket. getSendConvert()protected ConvertWebSocket. 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)voidHttpResponse. finish(Convert convert, Object obj)将结果对象输出voidHttpResponse. finish(Convert convert, Type type, Object obj)将结果对象输出voidHttpResponse. finish(Convert convert, Type resultType, HttpResult result)将HttpResult对象输出voidHttpResponse. finish(Convert convert, Type type, RetResult ret)将RetResult对象输出voidHttpResponse. finish(Convert convert, HttpScope result)将HttpScope对象输出voidHttpResponse. finishFuture(Convert convert, Type valueType, CompletionStage future)将CompletionStage对象输出voidHttpResponse. finishJson(Convert convert, Object obj)将对象以JSON格式输出voidHttpResponse. finishJson(Convert convert, Type type, Object obj)将对象以JSON格式输出voidHttpResponse. finishJsonFuture(Convert convert, Type valueType, CompletionStage future)将CompletionStage对象输出voidHttpResponse. finishPublisher(Convert convert, Type valueType, Object publisher)将第三方类Flow.Publisher对象(如: Mono/Flux)输出<T> voidHttpResponse. finishPublisher(Convert convert, Type valueType, Flow.Publisher<T> publisher)将Flow.Publisher对象输出voidHttpResponse. 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> THttpRequest. 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)voidHttpRender. 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 voidWebSocket. setBinaryConvert(Convert convert)protected voidWebSocket. setSendConvert(Convert convert)protected voidWebSocket. 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中的方法 修饰符和类型 方法 说明 ConvertSncpRequest. getConvert() -
org.redkale.service中Convert的使用
声明为Convert的org.redkale.service中的字段 修饰符和类型 字段 说明 protected ConvertRetResult. convert返回Convert的org.redkale.service中的方法 修饰符和类型 方法 说明 ConvertRetResult. clearConvert()ConvertRetResult. convert()参数类型为Convert的org.redkale.service中的方法 修饰符和类型 方法 说明 RetResultRetResult. convert(Convert convert)参数类型为Convert的org.redkale.service中的构造器 构造器 说明 RetResult(Convert convert, T result) -
org.redkale.source中Convert的使用
参数类型为Convert的org.redkale.source中的方法 修饰符和类型 方法 说明 voidCacheMemorySource.CacheEntry. addSsetValue(Convert convert, Type type, Object value)<T> TCacheMemorySource.CacheEntry. getMapValue(String field, Convert convert, Type type)<T> TCacheMemorySource.CacheEntry. getObjectValue(Convert convert, Type type)<T> TCacheMemorySource. getSet(String key, Convert convert, Type type, T value)default <T> TCacheSource. 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> voidCacheMemorySource. hset(String key, String field, Convert convert, Type type, T value)default <T> voidCacheSource. 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> booleanCacheMemorySource. hsetnx(String key, String field, Convert convert, Type type, T value)default <T> booleanCacheSource. 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 SerializableCacheMemorySource.CacheEntry. objToSerial(Convert convert, Type type, Object value)<T> voidCacheMemorySource. psetex(String key, long milliSeconds, Convert convert, Type type, T value)default <T> voidCacheSource. 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> intCacheSource. publish(String topic, Convert convert, Type messageType, T message)default <T> intCacheSource. 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> TCacheMemorySource.CacheEntry. serialToObj(Convert convert, Type type, Serializable value)<T> voidCacheMemorySource. set(String key, Convert convert, Type type, T value)default <T> voidCacheSource. set(int expireSeconds, String key, Convert convert, Type type, T value)已过时。default <T> voidCacheSource. set(int expireSeconds, String key, Convert convert, T value)已过时。default <T> voidCacheSource. 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> voidCacheMemorySource. setex(String key, int expireSeconds, Convert convert, Type type, T value)default <T> voidCacheSource. 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)voidCacheMemorySource.CacheEntry. setMapValue(String field, Convert convert, Type type, Object value)ObjectCacheMemorySource.CacheEntry. setMapValueIfAbsent(String field, Convert convert, Type type, Object value)<T> booleanCacheMemorySource. setnx(String key, Convert convert, Type type, T value)default <T> booleanCacheSource. 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> booleanCacheMemorySource. setnxex(String key, int expireSeconds, Convert convert, Type type, T value)default <T> booleanCacheSource. 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> booleanCacheMemorySource. setnxpx(String key, long milliSeconds, Convert convert, Type type, T value)default <T> booleanCacheSource. 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)voidCacheMemorySource.CacheEntry. setObjectValue(Convert convert, Type type, Object value)default <T> voidCacheSource. 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)
-