public static StoredProcedureInvocation roundTripForCL ( StoredProcedureInvocation invocation ) throws IOException { if ( invocation . getSerializedParams ( ) != null ) { return invocation ; } ByteBuffer buf = ByteBuffer . allocate ( invocation . getSerializedSize ( ) ) ; invocation . flattenToBuffer ( buf ) ; buf . flip ( ) ; StoredProcedureInvocation rti = new StoredProcedureInvocation ( ) ; rti . initFromBuffer ( buf ) ; return rti ; }
Serialize and then deserialize an invocation so that it has serializedParams set for command logging if the invocation is sent to a local site .