Ok, I see now how it is done in Java. All hotrod operations and OperationsFactory hold a reference to the same topology id AtomicInteger. Once a new topology id is read this object reference is changed and subsequent operations have a new topology id. I think this means we have to remove const from HeaderParams reference and change all calling signatures.