DDS-Java 1.0b2 FTF Avatar
  1. OMG Issue

DDSJAVA — DataReader API

  • Key: DDSJAVA-31
  • Legacy Issue Number: 16540
  • Status: closed  
  • Source: ADLINK Advanced Technology Office ( Angelo Corsaro)
  • Summary:

    The read API currently seems a bit too complicated. In some in some instances
    it provides part of the results as a return value and the rest by means of arguments.
    This does not feel right and again violates one of the key goal of having a new PSM: simplcity
    and usability.

    The API does not provide a way of deciding if one wants to read/take only valid
    data. This is a remark true in general for DDS which needs to be fixed for all PSM
    as well as for the PIM!

    The following methods on the DataReader interface are superfluous:

    • cast
    • createSample

    [Resolution]
    Refactor and cleanup the data-reader API.

  • Reported: DDS-Java 1.0b1 — Wed, 7 Sep 2011 04:00 GMT
  • Disposition: Resolved — DDS-Java 1.0b2
  • Disposition Summary:

    This issue has three parts: removing unnecessary methods, reading only samples with valid data, and simplifying method overloads.
    • The cast() method is not superfluous; it is the only type-safe way to narrow a DataReader<?> to a DataReader<Foo>. This method can potentially use internal state of the reader to provide immediate run-time type safety. The only alternative is for the application code to use a type cast like this: “(DataReader<Foo>)”. But such a cast is meaningless because of type erasure and will generate a compiler warning. If there is a type mismatch, it will potentially not be caught until later.
    • Issue #16324 already eliminated the createSample method.
    • Reading or taking only valid data samples may or may not be semantically meaningful and should be addressed in the PIM first, so that the semantics can be defined. At that point, the method can be introduced into this PSM in an RTF.
    • Issue #16321 already proposes simplifying the read/take overloads. Since this is the only remaining part of this issue not addressed in the bullets above, this issue can be merged with that one.
    Resolution:
    Merge this issue with issue #16321.
    Disposition: Merged with issue #16321

  • Updated: Fri, 6 Mar 2015 20:58 GMT