Optimize flushAll method for all adapters