You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/09/23 17:06:18 UTC

[GitHub] [accumulo] ctubbsii commented on issue #2280: SimpleTimer replacement is not a Singleton

ctubbsii commented on issue #2280:
URL: https://github.com/apache/accumulo/issues/2280#issuecomment-925997443


   > Your mention of singleton usage reminded me of a class @keith-turner created to manage static singletons, the `SingletonManager`. I don't know if it applies or not but I thought it was worth mentioning. https://github.com/apache/accumulo/blob/323bbea9a48930a6aa39546dc7f15943a1574e60/core/src/main/java/org/apache/accumulo/core/singletons/SingletonManager.java
   
   The SingletonManager stuff is quite complicated. It's not intended to manage all singletons, but rather to manage closable singleton lifecycles, and I would argue against reusing it for more singletons. It's primary use case is for implementing a singleton lifecycle for the closeable AccumuloClient, when legacy Instance/Connector APIs are used, so we can clean up the internal AccumuloClient when there are no more legacy Instance/Connector objects in use. I anticipate the SingletonManager class and related complex code will be removed when we remove those deprecated APIs from our code base.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org