@Override
public void onSuccess(int opsApplied, HashedVersion signature) throws TransformException {
if (unacknowledged == null) {
// Note: An ACK will only occur before echoBack delta.
throw new TransformException("Got ACK from server, but we had not sent anything. " + this);
}
if (unacknowledged.getResultingVersion() != signature.getVersion()) {
throw new TransformException("Got ACK from server, but we don't have the same version. " +
"Client expects new version " + unacknowledged.getResultingVersion() +
" and " + unacknowledged.size() + " acked ops, " +
" Server acked " + opsApplied + ", new version " + signature.getVersion() + ". " +
"[Received signature:" + signature + "] [Received opsApplied:" + opsApplied + "] " +
this);
}
if (opsApplied != unacknowledged.size()) {
throw new TransformException("Unable to accept ACK of different number of operations than "
+ "client issued. Client sent = " + unacknowledged.size() + " Server acked = "
+ opsApplied + ". " + this);
}
if (!acks.isEmpty()) {