@InterfaceAudience.Public public final class UserPayload extends Object
| Modifier and Type | Method and Description | 
|---|---|
static UserPayload | 
create(ByteBuffer payload)
Create a UserPayload instance which encapsulates a  
ByteBuffer. | 
static UserPayload | 
create(ByteBuffer payload,
      int version)
Create an explicitly versioned UserPayload instance which encapsulates a  
ByteBuffer. | 
byte[] | 
deepCopyAsArray()  | 
ByteBuffer | 
getPayload()
Return the payload as a read-only ByteBuffer. 
 | 
ByteBuffer | 
getRawPayload()
Return the payload as a ByteBuffer. 
 | 
int | 
getVersion()  | 
boolean | 
hasPayload()  | 
public static UserPayload create(@Nullable ByteBuffer payload)
ByteBuffer. The version number used will be 0payload - the ByteBuffer payloadUserPayloadpublic static UserPayload create(@Nullable ByteBuffer payload, int version)
ByteBuffer.payload - the ByteBuffer payloadUserPayload@Nullable public ByteBuffer getRawPayload()
@Nullable public ByteBuffer getPayload()
public int getVersion()
public boolean hasPayload()
@InterfaceStability.Unstable public byte[] deepCopyAsArray()
Copyright © 2021 Apache Software Foundation. All rights reserved.