Tabnine Logo
MessageSerializer.writePayload
Code IndexAdd Tabnine to your IDE (free)

How to use
writePayload
method
in
org.apache.flink.queryablestate.network.messages.MessageSerializer

Best Java code snippets using org.apache.flink.queryablestate.network.messages.MessageSerializer.writePayload (Showing top 6 results out of 315)

origin: apache/flink

/**
 * Serializes the response sent to the
 * {@link org.apache.flink.queryablestate.network.Client}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param response        The response to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <RESP extends MessageBody> ByteBuf serializeResponse(
    final ByteBufAllocator alloc,
    final long requestId,
    final RESP response) {
  Preconditions.checkNotNull(response);
  return writePayload(alloc, requestId, MessageType.REQUEST_RESULT, response.serialize());
}
origin: apache/flink

/**
 * Serializes the request sent to the
 * {@link org.apache.flink.queryablestate.network.AbstractServerBase}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param request        The request to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <REQ extends MessageBody> ByteBuf serializeRequest(
    final ByteBufAllocator alloc,
    final long requestId,
    final REQ request) {
  Preconditions.checkNotNull(request);
  return writePayload(alloc, requestId, MessageType.REQUEST, request.serialize());
}
origin: org.apache.flink/flink-queryable-state-client-java_2.11

/**
 * Serializes the request sent to the
 * {@link org.apache.flink.queryablestate.network.AbstractServerBase}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param request        The request to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <REQ extends MessageBody> ByteBuf serializeRequest(
    final ByteBufAllocator alloc,
    final long requestId,
    final REQ request) {
  Preconditions.checkNotNull(request);
  return writePayload(alloc, requestId, MessageType.REQUEST, request.serialize());
}
origin: org.apache.flink/flink-queryable-state-client-java_2.11

/**
 * Serializes the response sent to the
 * {@link org.apache.flink.queryablestate.network.Client}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param response        The response to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <RESP extends MessageBody> ByteBuf serializeResponse(
    final ByteBufAllocator alloc,
    final long requestId,
    final RESP response) {
  Preconditions.checkNotNull(response);
  return writePayload(alloc, requestId, MessageType.REQUEST_RESULT, response.serialize());
}
origin: com.alibaba.blink/flink-queryable-state-client-java

/**
 * Serializes the request sent to the
 * {@link org.apache.flink.queryablestate.network.AbstractServerBase}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param request        The request to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <REQ extends MessageBody> ByteBuf serializeRequest(
    final ByteBufAllocator alloc,
    final long requestId,
    final REQ request) {
  Preconditions.checkNotNull(request);
  return writePayload(alloc, requestId, MessageType.REQUEST, request.serialize());
}
origin: com.alibaba.blink/flink-queryable-state-client-java

/**
 * Serializes the response sent to the
 * {@link org.apache.flink.queryablestate.network.Client}.
 *
 * @param alloc            The {@link ByteBufAllocator} used to allocate the buffer to serialize the message into.
 * @param requestId        The id of the request to which the message refers to.
 * @param response        The response to be serialized.
 * @return A {@link ByteBuf} containing the serialized message.
 */
public static <RESP extends MessageBody> ByteBuf serializeResponse(
    final ByteBufAllocator alloc,
    final long requestId,
    final RESP response) {
  Preconditions.checkNotNull(response);
  return writePayload(alloc, requestId, MessageType.REQUEST_RESULT, response.serialize());
}
org.apache.flink.queryablestate.network.messagesMessageSerializerwritePayload

Javadoc

Helper for serializing the messages.

Popular methods of MessageSerializer

  • <init>
  • deserializeHeader
    De-serializes the header and returns the MessageType. The buffer is expected to be at the header po
  • deserializeRequest
    De-serializes the request sent to the org.apache.flink.queryablestate.network.AbstractServerBase. T
  • deserializeRequestFailure
    De-serializes the RequestFailure sent to the org.apache.flink.queryablestate.network.Client in case
  • deserializeResponse
    De-serializes the response sent to the org.apache.flink.queryablestate.network.Client. The buffer i
  • deserializeServerFailure
    De-serializes the failure message sent to the org.apache.flink.queryablestate.network.Client in case
  • getRequestId
    De-serializes the header and returns the MessageType. The buffer is expected to be at the request i
  • serializeRequestFailure
    Serializes the exception containing the failure message sent to the org.apache.flink.queryablestate.
  • serializeResponse
    Serializes the response sent to the org.apache.flink.queryablestate.network.Client.
  • serializeServerFailure
    Serializes the failure message sent to the org.apache.flink.queryablestate.network.Client in case of
  • writeHeader
    Helper for serializing the header.
  • serializeRequest
    Serializes the request sent to the org.apache.flink.queryablestate.network.AbstractServerBase.
  • writeHeader,
  • serializeRequest

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now