PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ Request to make irreversible pd4ml methods reversible Re: Re: Request to make irreversible pd4ml methods reversible

#29378

Any decent Java developer knows that using thread-unsafe methods on an instance from multiple threads will lead to inconsistent behavior. In this case, it makes sense to instantiate a new instance, and I think developers know this already. It just comes with the territory of parallel programming.

However, why would you intentionally design the API around the parallel use case when the serial use case is just as valid and probably used just as often? For instance, if the developer wants to set up a PD4ML instance with the same options and footers and headers for a large batch of documents that they plan to render in serial, why would you have them instantiate a new PD4ML object and set these options every time? That’s unnecessary and time consuming.

I appreciate that you’re reviewing your API and making it consistent. I’m just requesting that the API be considered from several use cases. Not just the most complicated one.