Skip to content

Discussion: rename and deprecated status of putDirect and deleteDirect #11

@erickok

Description

@erickok

As per Binghammers question and subsequent discussion, let us discuss the best solution for 2.x.

In RxCupboard 1.x there were originally 2 methods to add: put(T entity) and delete(T entity). These directly called into Cupboard to perform the operation. Rightfully so, I then got a PR to add reactive versions for these, to use in streams. We are a reactive library after all!

So we introduced putRx(T entity) and deleteRx(T entity). They had to be called xxxRx as we already had methods with the same name and parameter signature with the direct variants.

For 2.x I decided that the reactive versions of these methods were actually the ones that we should have been using all along. We are reactive. So I promoted them to be the primary way of adding/deleting entities by renaming them to simple put and delete. The direct, non-reactive variants had to be renamed then to putDirect and deleteDirect.

For the 2.0-rc1 I was in doubt whether the xxxDirect methods should stay at all. Therefore they are marked as deprecated. I am not sure though, they are convenient and maybe we should keep them. In we keep them, I will un-deprecate them. Regardless I will have to add JavaDoc to the available methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions