Skip to content
This repository was archived by the owner on Aug 25, 2020. It is now read-only.
This repository was archived by the owner on Aug 25, 2020. It is now read-only.

CloseableIterator "kind of" breaks Iterator interface contract #2

Description

@danbim

As Java heavily relies on iterators (e.g., simplified for-loop) it will usually never care about the fact that the EventStore iterators would have to be closed. Also users of the event store typically don't expect this kind of behavior. If possible the iterator returned by the event store should "close itself", i.e.,

  • close automatically if end has been reached (hasNext() == false) and
  • close itself automatically if not used anymore (should be possible when GC calls finalize())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions