[OPENDJ-5896] Add Stream or reactive Publisher support to EntryReader interface Created: 04/Jan/19  Updated: 08/Nov/19

Status: Dev backlog
Project: OpenDJ
Component/s: core apis
Affects Version/s: 7.0.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Matthew Swift Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


Typical use-case:

    private static Version readConfigFileVersion(final Path configFile) throws InitializationException {
        try (LdifEntryReader reader = new LdifEntryReader(newBufferedReader(configFile))) {
            while (reader.hasNext()) {
                final Entry entry = reader.readEntry();
                if (entry.getName().equals(ROOT_CONFIG)) {
                    return entry.parseAttribute("ds-cfg-version").as(v -> version(v.toString()));
            return null;
        } catch (IOException e) {
            throw new InitializationException(ERR_CANNOT_READ_CONFIG_VERSION.get(configFile, e.getLocalizedMessage()));

A reactive approach might be more appropriate in order to support error handling and back-pressure. For consistency, we should also consider adding similar support to ChangeRecordReader.

Generated at Thu Aug 13 10:55:10 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.