private void cleanupAll() {

        T current;

        // Remove all objects from underlying collection, cleaning up each
        // object individually
        while ((current = objects.poll()) != null)
            cleanup(current);

    }
Invokes the cleanup() function on all tracked objects, removing each
object from the underlying collection. It is guaranteed that cleanup()
will be invoked only once for each object, even if multiple calls to
cleanupAll() are running concurrently, and that the underlying collection
will be empty after all calls to cleanupAll() complete.
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/SharedObjectManager.java