|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.s4.core.Sender
public class Sender
The Sender
and its counterpart Receiver
are the top level classes of the communication layer.
Sender
is responsible for sending an event to a ProcessingElement
instance using a hashKey.
Details on how the cluster is partitioned and how events are serialized and transmitted to its destination are hidden from the application developer.
Constructor Summary | |
---|---|
Sender(Emitter emitter,
SerializerDeserializer serDeser,
Hasher hasher,
Assignment assignment)
|
Method Summary | |
---|---|
boolean |
checkAndSendIfNotLocal(java.lang.String hashKey,
Event event)
This method attempts to send an event to a remote partition. |
void |
sendToRemotePartitions(Event event)
Send an event to all the remote partitions in the cluster. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
@Inject public Sender(Emitter emitter, SerializerDeserializer serDeser, Hasher hasher, Assignment assignment)
emitter
- the emitter implements the low level communication layer.serDeser
- a serialization mechanism.hasher
- a hashing function to map keys to partition IDs.Method Detail |
---|
public boolean checkAndSendIfNotLocal(java.lang.String hashKey, Event event)
hashKey
- the string used to map the value of a key to a specific partition.event
- the event to be delivered to a ProcessingElement
instance.
public void sendToRemotePartitions(Event event)
event
- the event to be delivered to ProcessingElement
instances.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |