public abstract class StreamEvent extends Object
StreamSource
and StreamProcessor
interface
should emit and process implementations of this interface.Constructor and Description |
---|
StreamEvent() |
Modifier and Type | Method and Description |
---|---|
Object |
getPartitionKey()
Return the partitioning key used for partitioning a stream.
|
String |
getStreamId()
Returns the identifier of the stream to which the event belongs to.
|
abstract byte[] |
marshall()
Convert a StreamTuple object into a byte[] for communication.
|
abstract void |
marshallAsBatch(DataOutputStream dataOutputStream) |
void |
setStreamId(String streamId) |
abstract void |
unmarshall(byte[] bytes)
Populate a StreamTuple object from a byte array.
|
abstract void |
unmarshallAsBatch(DataInputStream dataInputStream) |
public String getStreamId()
public void setStreamId(String streamId)
public abstract void unmarshall(byte[] bytes) throws IOException
bytes
- byte array offered by the communication layer.IOException
public abstract byte[] marshall() throws IOException
IOException
public abstract void marshallAsBatch(DataOutputStream dataOutputStream) throws IOException
IOException
public abstract void unmarshallAsBatch(DataInputStream dataInputStream) throws IOException
IOException
public Object getPartitionKey()
Copyright © 2015. All rights reserved.