public interface Message
Modifier and Type | Method and Description |
---|---|
String |
getDatabaseName()
Returns the name of the database.
|
ReadPreference |
getReadPreference()
Provides the details on which servers are eligible to receive the
message.
|
void |
validateSize(SizeOfVisitor visitor,
int maxDocumentSize)
Validates that the documents with the message do not exceed the maximum
document size specified.
|
void |
write(int messageId,
BsonOutputStream out)
Writes the message from the stream.
|
String getDatabaseName()
ReadPreference getReadPreference()
ReadPreference
for which servers should be sent the
request.void validateSize(SizeOfVisitor visitor, int maxDocumentSize) throws DocumentToLargeException
visitor
- The SizeOfVisitor
to compute the size of the document.maxDocumentSize
- The maximum document size to validate against.DocumentToLargeException
- If one of the documents in the message is too large or the
documents in aggregate are too large.void write(int messageId, BsonOutputStream out) throws IOException
messageId
- The id to be assigned to the message.out
- The sink for data written.IOException
- On an error writing to the stream.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.