public final void updateKey ( String key ) throws IOException { Objects . requireNonNull ( key , "old key required" ) ; if ( index . containsKey ( key ) ) { MtasSolrStatus status = index . get ( key ) ; index . remove ( key ) ; if ( ! index . containsKey ( status . key ( ) ) ) { index . put ( status . key ( ) , status ) ; } else { throw new IOException ( "key already exists" ) ; } } }
Update key .