public TokenMetadata cloneOnlyTokenMap ( ) { lock . readLock ( ) . lock ( ) ; try { return new TokenMetadata ( SortedBiMultiValMap . < Token , InetAddress > create ( tokenToEndpointMap , null , inetaddressCmp ) , HashBiMap . create ( endpointToHostIdMap ) , new Topology ( topology ) ) ; } finally { lock . readLock ( ) . unlock ( ) ; } }
Create a copy of TokenMetadata with only tokenToEndpointMap . That is pending ranges bootstrap tokens and leaving endpoints are not included in the copy .