final long lastCommittedSpHandle,
final long uniqueId,
final long undoToken)
{
// big endian, not direct
final FastSerializer fser = new FastSerializer();
try {
for (int i = 0; i < numFragmentIds; ++i) {
// pset can be ByteBuffer or ParameterSet instance
if (parameterSets[i] instanceof ByteBuffer) {
fser.write((ByteBuffer) parameterSets[i]);
}
else {
ParameterSet pset = (ParameterSet) parameterSets[i];
ByteBuffer buf = ByteBuffer.allocate(pset.getSerializedSize());
pset.flattenToBuffer(buf);
buf.flip();
fser.write(buf);
}
}
} catch (final IOException exception) {
fser.discard();
throw new RuntimeException(exception);
}
// if inputDepIds is null, make a bunch of dummies
long[] inputDepIds = inputDepIdsIn;
if (inputDepIds == null) {
inputDepIds = new long[numFragmentIds];
for (int i = 0; i < inputDepIds.length; i++) {
inputDepIds[0] = -1;
}
}
m_data.clear();
m_data.putInt(cmd.m_id);
m_data.putLong(txnId);
m_data.putLong(spHandle);
m_data.putLong(lastCommittedSpHandle);
m_data.putLong(uniqueId);
m_data.putLong(undoToken);
m_data.putInt(numFragmentIds);
for (int i = 0; i < numFragmentIds; ++i) {
m_data.putLong(planFragmentIds[i]);
}
for (int i = 0; i < numFragmentIds; ++i) {
m_data.putLong(inputDepIds[i]);
}
m_data.put(fser.getBuffer());
fser.discard();
try {
m_data.flip();
m_connection.write();
} catch (final Exception e) {