/** * Triggers a commit. * @param version * @throws TransformException * @throws OperationException */ public void triggerServerCommit(long version) throws TransformException, OperationException { if (listener != null) { listener.onCommit(version); } }
/** * Pretend server opened the connection at the given startSignature and tells of the last * signature. * * @param startSignature * @param endSignature */ public void triggerOnOpen(HashedVersion startSignature, HashedVersion endSignature) throws ChannelException { listener.onOpen(startSignature, endSignature); }
/** * Triggers an ack. * @param numDeltasApplied * @param signature * @throws TransformException * @throws OperationException */ public void triggerServerSuccess(int numDeltasApplied, HashedVersion signature) throws TransformException, OperationException { if (listener != null) { listener.onSuccess(numDeltasApplied, signature); } }
/** * Pretend we got the deltas on the wire. */ public void triggerServerDeltas(List<TransformedWaveletDelta> deltas) throws TransformException, OperationException { receivedDeltas.addAll(deltas); if (listener != null) { listener.onServerDeltas(deltas); } }
/** * Pretend we got the delta on the wire. */ public void triggerServerDelta(TransformedWaveletDelta delta) throws TransformException, OperationException { receivedDeltas.add(delta); if (listener != null) { listener.onServerDelta(delta); } }
/** * Pretend we got the deltas on the wire. */ public void triggerServerDeltas(List<TransformedWaveletDelta> deltas) throws TransformException, OperationException { receivedDeltas.addAll(deltas); if (listener != null) { listener.onServerDeltas(deltas); } }
/** * Pretend we got the delta on the wire. */ public void triggerServerDelta(TransformedWaveletDelta delta) throws TransformException, OperationException { receivedDeltas.add(delta); if (listener != null) { listener.onServerDelta(delta); } }
/** * Pretend we got the deltas on the wire. */ public void triggerServerDeltas(TransformedWaveletDelta[] deltas) throws TransformException, OperationException { List<TransformedWaveletDelta> received = CollectionUtils.newArrayList(); for (TransformedWaveletDelta delta : deltas) { receivedDeltas.add(delta); received.add(delta); } if (listener != null) { listener.onServerDeltas(received); } }
/** * Triggers a commit. * @param version * @throws TransformException * @throws OperationException */ public void triggerServerCommit(long version) throws TransformException, OperationException { if (listener != null) { listener.onCommit(version); } }
/** * Pretend server opened the connection at the given startSignature and tells of the last * signature. * * @param startSignature * @param endSignature */ public void triggerOnOpen(HashedVersion startSignature, HashedVersion endSignature) throws ChannelException { listener.onOpen(startSignature, endSignature); }
/** * Triggers an ack. * @param numDeltasApplied * @param signature * @throws TransformException * @throws OperationException */ public void triggerServerSuccess(int numDeltasApplied, HashedVersion signature) throws TransformException, OperationException { if (listener != null) { listener.onSuccess(numDeltasApplied, signature); } }
/** * Pretend we got the deltas on the wire. */ public void triggerServerDeltas(TransformedWaveletDelta[] deltas) throws TransformException, OperationException { List<TransformedWaveletDelta> received = CollectionUtils.newArrayList(); for (TransformedWaveletDelta delta : deltas) { receivedDeltas.add(delta); received.add(delta); } if (listener != null) { listener.onServerDeltas(received); } }