elasticsearch/elasticsearch — pull request #8210 by s1monw (2014-10-23 15:36:59+00:00)
Title: [UTILITIES] Introduce a RefCounted interface and basic impl

We already have two places duplicating this rather hairy logic, this
commit intorduces a new RefCoutned interace and an abstract implementation
that can be used for delegation. It factors out all the reference counting
and adds single and multithreaded test for it.