public synchronized void refreshIndexes ( ) { /* * cache index by Bin name */ if ( this . indexCache == null ) this . indexCache = new TreeMap < String , Index > ( ) ; Node [ ] nodes = client . getNodes ( ) ; for ( Node node : nodes ) { if ( node . isActive ( ) ) { try { String indexString = Info . request ( getInfoPolicy ( ) , node , "sindex" ) ; if ( ! indexString . isEmpty ( ) ) { String [ ] indexList = indexString . split ( ";" ) ; for ( String oneIndexString : indexList ) { Index index = new Index ( oneIndexString ) ; this . indexCache . put ( index . toKeyString ( ) , index ) ; } } break ; } catch ( AerospikeException e ) { log . error ( "Error geting Index informaton" , e ) ; } } } }
refreshes the Index cache from the Cluster