public class IdMessage extends Object implements Message
Modifier and Type | Field and Description |
---|---|
static IdMessage |
POISON_PILL |
Modifier | Constructor and Description |
---|---|
protected |
IdMessage(String id,
byte[] data,
boolean poisonPill,
boolean forceBatch) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
forceBatch()
A consumer reading this message must not wait for new message to process the batch.
|
byte[] |
getData() |
String |
getId()
A message identifier.
|
int |
hashCode() |
static IdMessage |
of(String id) |
static IdMessage |
of(String id,
byte[] data) |
static IdMessage |
ofForceBatch(String id) |
static IdMessage |
ofForceBatch(String id,
byte[] data)
A message that force the batch.
|
boolean |
poisonPill()
This message is a poison pill it contains no other data,
a consumer reading this message will process the batch and stop.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static IdMessage POISON_PILL
public static IdMessage ofForceBatch(String id, byte[] data)
public static IdMessage ofForceBatch(String id)
public byte[] getData()
public boolean poisonPill()
Message
poisonPill
in interface Message
public boolean forceBatch()
Message
forceBatch
in interface Message
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © 2017 Nuxeo. All rights reserved.