Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core-edge: end of stream, marshals and cursors
Uses EndOfStreamException everywhere to circumvent the issue of ReadPastEndException inheriting from IOException, which is problematic since in general you want to handle end of stream differently than arbitrary IOExceptions. Also the marshallers now do not return null to signify the end of stream condition, but rather actually throw the EndOfStreamException for proper handling. This also allows the few cases were null actually was a valid state to be marshalled correctly and without special case handling. Introduces abstract marshal wrappers for taking easy advantage of the EndOfStreamException and catching ReadPastEndExceptions. Renames cursors to cursor (instead of reader) all over the place in test and production code, where applicable. Pushes more code into EntryRecordCursor instead of overriding the behaviour in the SegmentFile, making things cleaner, even though the two classes interact tightly. Fixes an issue where channels were not being closed correctly for cursors reading past the end. Fixes an issue where channels experiencing errors would still be returned to the pool.
- Loading branch information
1 parent
361756b
commit 62bd4f5
Showing
39 changed files
with
498 additions
and
376 deletions.
There are no files selected for viewing
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
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.