@ Override public void update ( Result < Integer > result , int nodeIndex , String sql , Object [ ] args ) { NodePodAmp node = _podKraken . getNode ( nodeIndex ) ; for ( int i = 0 ; i < node . serverCount ( ) ; i ++ ) { ServerBartender server = node . server ( i ) ; if ( server != null && server . isUp ( ) ) { ClusterServiceKraken proxy = _podKraken . getProxy ( server ) ; // XXX: failover proxy . update ( result , nodeIndex , sql , args ) ; return ; } } RuntimeException exn = new ServiceException ( L . l ( "update failed with no live servers" ) ) ; exn . fillInStackTrace ( ) ; // XXX: fail result . fail ( exn ) ; }
Distributed update table . All owning nodes will get a request .