You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2023/01/16 11:31:36 UTC
[DISCUSS] PLC4J API changes
Hi all,
as you know, I’m currently working on the new cache (which is sort of finished). For this I had the problem, that I didn’t want to mirror all of the driver related methods in PlcDriverManager.
So I introduced a new interface PlcConnectionManager which simply has the two getConnection methods. The cache simply implements this interface.
Now while updating all usages of the cache and the connection-pool, I noticed the API still is a bit odd. So I did a little bit more of a refactoring.
I renamed the PlcDriverManager to DefaultPlcDriverManager and added a new interface PlcDriverManager. This interface contains all of the driver-related methods from the old PlcDriverManager.
I added a getConnectionManager() method to that interface.
The DefaultPlcDriverManager currently implements both interfaces, so it hasn’t really changed much.
Also does the PlcDriverManager have a static “getDefault()” method that simply instantiates the DefaultPlcDriverManager.
It’s currently in my cache branch: feature/cdutz/connection-cache-and-scraper-ng
Looking forward to your feedback.
Chris
Re: [DISCUSS] PLC4J API changes
Posted by Christofer Dutz <ch...@c-ware.de>.
Tomorrow I'll be merging my changes to develop.
Gesendet von Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: Christofer Dutz <ch...@c-ware.de>
Sent: Monday, January 16, 2023 12:31:36 PM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: [DISCUSS] PLC4J API changes
Hi all,
as you know, I’m currently working on the new cache (which is sort of finished). For this I had the problem, that I didn’t want to mirror all of the driver related methods in PlcDriverManager.
So I introduced a new interface PlcConnectionManager which simply has the two getConnection methods. The cache simply implements this interface.
Now while updating all usages of the cache and the connection-pool, I noticed the API still is a bit odd. So I did a little bit more of a refactoring.
I renamed the PlcDriverManager to DefaultPlcDriverManager and added a new interface PlcDriverManager. This interface contains all of the driver-related methods from the old PlcDriverManager.
I added a getConnectionManager() method to that interface.
The DefaultPlcDriverManager currently implements both interfaces, so it hasn’t really changed much.
Also does the PlcDriverManager have a static “getDefault()” method that simply instantiates the DefaultPlcDriverManager.
It’s currently in my cache branch: feature/cdutz/connection-cache-and-scraper-ng
Looking forward to your feedback.
Chris