private void createAndRegisterRemoveChildrenCommand(RemoteCompositeValueState parentState, List<RemoteValueState> removedChildren) { RemoteChildrenCommand parentRemoveCommand = new RemoteChildrenCommand(); parentRemoveCommand.setTargetPeerGuid(parentState.getGuid()); parentRemoveCommand.setRemove(true); String[] removedChildrenGuids = new String[removedChildren.size()]; for (int i = 0; i < removedChildren.size(); i++) { removedChildrenGuids[i] = removedChildren.get(i).getGuid(); } parentRemoveCommand.setRemovedChildrenGuids(removedChildrenGuids); remoteCommandHandler.registerCommand(parentRemoveCommand); }
RemoteChildrenCommand parentCommand = new RemoteChildrenCommand(); parentCommand.setTargetPeerGuid(parentState.getGuid()); if (parentState.getChildren() != null) { parentCommand.setChildren(new ArrayList<>(parentState.getChildren())); } else { parentCommand.setChildren(null); parentCommand.setRemove(false); remoteCommandHandler.registerCommand(parentCommand); RemoteChildrenCommand command = new RemoteChildrenCommand(); command.setTargetPeerGuid(compositeValueState.getGuid()); if (compositeValueState.getChildren() != null) { command.setChildren(new ArrayList<>(compositeValueState.getChildren())); } else { command.setChildren(null);
RemoteChildrenCommand parentCommand = new RemoteChildrenCommand(); parentCommand.setTargetPeerGuid(parentState.getGuid()); if (parentState.getChildren() != null) { RemoteChildrenCommand command = new RemoteChildrenCommand(); command.setTargetPeerGuid(compositeValueState.getGuid()); if (compositeValueState.getChildren() != null) {
if (command instanceof RemoteChildrenCommand && ((RemoteChildrenCommand) command).isRemove()) { commandQueue.add(commandLowPriorityOffset, command); commandLowPriorityOffset++;