public static FragmentTaskMessage createWithOneFragment ( long initiatorHSId , long coordinatorHSId , long txnId , long uniqueId , boolean isReadOnly , byte [ ] planHash , int outputDepId , ParameterSet params , boolean isFinal , boolean isForReplay , boolean isNPartTxn , long timestamp ) { ByteBuffer parambytes = null ; if ( params != null ) { parambytes = ByteBuffer . allocate ( params . getSerializedSize ( ) ) ; try { params . flattenToBuffer ( parambytes ) ; parambytes . flip ( ) ; } catch ( IOException e ) { VoltDB . crashLocalVoltDB ( "Failed to serialize parameter for fragment: " + params . toString ( ) , true , e ) ; } } FragmentTaskMessage ret = new FragmentTaskMessage ( initiatorHSId , coordinatorHSId , txnId , uniqueId , isReadOnly , isFinal , isForReplay , isNPartTxn , timestamp ) ; ret . addFragment ( planHash , outputDepId , parambytes ) ; return ret ; }
Convenience factory method to replace constructor that includes arrays of stuff .