This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
S4-7 Guaranteed, ordered, robust TCP protocol - send() queues the mes…
…sages - an asynchronous thread pool sends it using Netty - on success, the delivered message is notified - added close() method to Emitter and Listener - added tests to check the above-mentioned properties
- Loading branch information
1 parent
5e38aa2
commit 8e2427b
Showing
27 changed files
with
865 additions
and
582 deletions.
There are no files selected for viewing
18 changes: 11 additions & 7 deletions
18
subprojects/s4-base/src/main/java/org/apache/s4/base/Emitter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
package org.apache.s4.base; | ||
|
||
public interface Emitter { | ||
|
||
/* | ||
* @param partitionId - destination partition | ||
* @param message - message payload that needs to be sent | ||
* @return - true - if message is sent across successfully | ||
* - false - if send fails | ||
*/ | ||
|
||
/* | ||
* @param partitionId - destination partition | ||
* | ||
* @param message - message payload that needs to be sent | ||
* | ||
* @return - true - if message is sent across successfully - false - if send fails | ||
*/ | ||
boolean send(int partitionId, byte[] message); | ||
|
||
int getPartitionCount(); | ||
|
||
void close(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.