/** * Creates a stacklet and (optionally) initialises it with a snapshot. * * @param waveletId the wavelet id of the channel to create * @param snapshot the wavelet container for the new channel * @param committedVersion the committed version for the new channel * @param accessibility accessibility the user currently has to the wavelet * @param initialiseLocalChannel whether to send the snapshot through the * stacklet, in which case it should expect and drop an additional * snapshot from the network */ private void addOperationChannel(final WaveletId waveletId, ObservableWaveletData snapshot, HashedVersion committedVersion, Accessibility accessibility, boolean initialiseLocalChannel) throws ChannelException { final Stacklet stacklet = createStacklet(waveletId, snapshot, accessibility, initialiseLocalChannel); if (initialiseLocalChannel) { final HashedVersion currentVersion = snapshot.getHashedVersion(); initialiseLocallyCreatedStacklet(stacklet, waveletId, snapshot, committedVersion, currentVersion); } }