/** * Create a VoltMessage that can be fed into CI's handleRead() method. * * @param origTxnId The original txnId if it's a replicated transaction * @param name The procedure name * @param params Procedure parameters * @return * @throws IOException */ private static ByteBuffer createMsg(Long origTxnId, String name, final Object... params) throws IOException { FastSerializer fs = new FastSerializer(); StoredProcedureInvocation proc = new StoredProcedureInvocation(); proc.setProcName(name); if (origTxnId != null) proc.setOriginalTxnId(origTxnId); proc.setParams(params); fs.writeObject(proc); return fs.getBuffer(); }