String [ ] [ ] findPartitionInfo ( String hostName , String userDir , String libertyServerName , String executorIdentifier ) throws Exception { PartitionRecord criteria = new PartitionRecord ( false ) ; if ( hostName != null ) criteria . setHostName ( hostName ) ; if ( userDir != null ) criteria . setUserDir ( userDir ) ; if ( libertyServerName != null ) criteria . setLibertyServer ( libertyServerName ) ; if ( executorIdentifier != null ) criteria . setExecutor ( executorIdentifier ) ; List < PartitionRecord > records = null ; TransactionController tranController = new TransactionController ( ) ; try { tranController . preInvoke ( ) ; records = taskStore . find ( criteria ) ; } catch ( Throwable x ) { tranController . setFailure ( x ) ; } finally { Exception x = tranController . postInvoke ( Exception . class ) ; if ( x != null ) throw x ; } String [ ] [ ] partitionInfo = new String [ records == null ? 0 : records . size ( ) ] [ 5 ] ; if ( records != null ) // guard against impossible null value to make FindBugs stop complaining for ( int i = 0 ; i < records . size ( ) ; i ++ ) { PartitionRecord record = records . get ( i ) ; partitionInfo [ i ] [ 0 ] = Long . toString ( record . getId ( ) ) ; partitionInfo [ i ] [ 1 ] = record . getHostName ( ) ; partitionInfo [ i ] [ 2 ] = record . getUserDir ( ) ; partitionInfo [ i ] [ 3 ] = record . getLibertyServer ( ) ; partitionInfo [ i ] [ 4 ] = record . getExecutor ( ) ; } return partitionInfo ; }
Finds partition information in the persistent store . All of the parameters are optional . If a parameter is specified only entries that match it are retrieved from the persistent store .