Replies: 1 comment
-
@SeonJK Thank you for suggestion! Great diagram and description 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
AS-IS
While using EuTxManager with multiple instances, they cause wrong execution.
For example, adding multiple EuTxManager due to add multiple EuPI, app cannot easily manage EuPI.
TO-DO
By applying Singleton pattern, code prevents from several issues.
I suggest singleton pattern by Bill Pugh solution. It makes sure Thread-safe.
Applying singleton pattern by @volatile and @synchronized causes performance decreasement.
However by Bill Pugh solution, EuTxManager class makes singleton through Holder class. Holder class makes sure to load once.
References:
Beta Was this translation helpful? Give feedback.
All reactions