/** * Reconnects the channel at the current version by sending an initial message with a * version and signature. * * @param reconnect reconnection message * @param committed last committed version at reconnection */ private void reconnectChannel(List<TransformedWaveletDelta> reconnect, long committed, byte[] commitSignature) throws ChannelException { HashedVersion commitVersion = HashedVersion.of(committed, commitSignature); deltaChannel.onWaveletUpdate(reconnect, commitVersion, null); }
/** * Reconnects the channel at the current version by sending an initial message with a * version and signature. * * @param reconnect reconnection message * @param committed last committed version at reconnection */ private void reconnectChannel(List<TransformedWaveletDelta> reconnect, long committed, byte[] commitSignature) throws ChannelException { HashedVersion commitVersion = HashedVersion.of(committed, commitSignature); deltaChannel.onWaveletUpdate(reconnect, commitVersion, null); }
/** * Receives a delta message on a connected channel. * * @param delta delta to receive, or null for no delta * @param committed last committed version, or -1 to omit */ private void receiveUpdateOnConnectedChannel(TransformedWaveletDelta delta, long committed, byte[] commitSignature) throws ChannelException { HashedVersion commitVersion = null; List<TransformedWaveletDelta> deltas = CollectionUtils.newArrayList(); if (delta != null) { deltas.add(delta); } if (committed != -1) { commitVersion = HashedVersion.of(committed, commitSignature); } deltaChannel.onWaveletUpdate(deltas, commitVersion, null); }
/** * Receives a delta message on a connected channel. * * @param delta delta to receive, or null for no delta * @param committed last committed version, or -1 to omit */ private void receiveUpdateOnConnectedChannel(TransformedWaveletDelta delta, long committed, byte[] commitSignature) throws ChannelException { HashedVersion commitVersion = null; List<TransformedWaveletDelta> deltas = CollectionUtils.newArrayList(); if (delta != null) { deltas.add(delta); } if (committed != -1) { commitVersion = HashedVersion.of(committed, commitSignature); } deltaChannel.onWaveletUpdate(deltas, commitVersion, null); }