Allow the transport to specify the maximum segment length.

This commit is contained in:
akwizgran
2012-01-20 23:06:51 +00:00
parent 13eff752da
commit 3a77ba9aaf
34 changed files with 195 additions and 39 deletions

View File

@@ -8,4 +8,9 @@ public interface SegmentSink {
/** Writes the given segment. */
void writeSegment(Segment s) throws IOException;
/**
* Returns the maximum length in bytes of the segments this sink accepts.
*/
int getMaxSegmentLength();
}

View File

@@ -11,4 +11,9 @@ public interface SegmentSource {
* segment was read, or false if no more segments can be read.
*/
boolean readSegment(Segment s) throws IOException;
/**
* Returns the maximum length in bytes of the segments this source returns.
*/
int getMaxSegmentLength();
}