private int executeZeroFunction ( Pool pool ) throws FunctionException , InterruptedException { int result = - 1 ; ResultCollector < ? , ? > collector = FunctionService . onServer ( pool ) . execute ( new ZeroFunction ( ) ) ; List < ? > functionResult = ( List < ? > ) collector . getResult ( ) ; if ( ( functionResult != null ) && ( functionResult . size ( ) == 1 ) && ( functionResult . get ( 0 ) instanceof Integer ) ) { result = ( Integer ) functionResult . get ( 0 ) ; } return result ; }
Executes the zero function using pool for the concrete server .