Address review comments

This commit is contained in:
Torsten Grote
2016-12-16 10:15:59 -02:00
parent 501980d8fe
commit 5345db0b6b
9 changed files with 92 additions and 78 deletions

View File

@@ -24,4 +24,5 @@ public interface RecordReader {
boolean hasRequest() throws IOException;
Request readRequest() throws IOException;
}

View File

@@ -17,15 +17,10 @@ public interface SyncConstants {
/**
* The maximum length of the record payload in bytes.
*/
int MAX_RECORD_PAYLOAD_LENGTH = 32 * 1024; // 32 KiB
int MAX_RECORD_PAYLOAD_LENGTH = 48 * 1024; // 48 KiB
/** The maximum length of a group descriptor in bytes. */
int MAX_GROUP_DESCRIPTOR_LENGTH = 32 * 1024; // 32 KiB
/**
* The maximum length of a message in bytes.
*/
int MAX_MESSAGE_LENGTH = MAX_RECORD_PAYLOAD_LENGTH - RECORD_HEADER_LENGTH;
int MAX_GROUP_DESCRIPTOR_LENGTH = 16 * 1024; // 16 KiB
/**
* The length of the message header in bytes.
@@ -37,6 +32,11 @@ public interface SyncConstants {
*/
int MAX_MESSAGE_BODY_LENGTH = 32 * 1024; // 32 KiB
/**
* The maximum length of a message in bytes.
*/
int MAX_MESSAGE_LENGTH = MESSAGE_HEADER_LENGTH + MAX_MESSAGE_BODY_LENGTH;
/**
* The maximum number of message IDs in an ack, offer or request record.
*/