Class StreamMessage
java.lang.Object
org.apache.cassandra.streaming.messages.StreamMessage
- Direct Known Subclasses:
CompleteMessage,IncomingStreamMessage,KeepAliveMessage,OutgoingStreamMessage,PrepareAckMessage,PrepareSynAckMessage,PrepareSynMessage,ReceivedMessage,SessionFailedMessage,StreamInitMessage
StreamMessage is an abstract base class that every messages in streaming protocol inherit.
Every message carries message type(
StreamMessage.Type) and streaming protocol version byte.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceStreamMessage.Serializer<V extends StreamMessage>StreamMessage serializerstatic enumStreamMessage types -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamMessagedeserialize(DataInputPlus in, int version) getOrCreateAndAttachInboundSession(StreamingChannel channel, int messagingVersion) Get or create aStreamSessionbased on this stream message data: not all stream messages support this, so the default implementation just throws an exception.intstatic voidserialize(StreamMessage message, StreamingDataOutputPlus out, int version, StreamSession session) static longserializedSize(StreamMessage message, int version)
-
Field Details
-
type
-
-
Constructor Details
-
StreamMessage
-
-
Method Details
-
serialize
public static void serialize(StreamMessage message, StreamingDataOutputPlus out, int version, StreamSession session) throws IOException - Throws:
IOException
-
serializedSize
- Throws:
IOException
-
deserialize
- Throws:
IOException
-
getPriority
public int getPriority()- Returns:
- priority of this message. higher value, higher priority.
-
getOrCreateAndAttachInboundSession
public StreamSession getOrCreateAndAttachInboundSession(StreamingChannel channel, int messagingVersion) Get or create aStreamSessionbased on this stream message data: not all stream messages support this, so the default implementation just throws an exception.
-