class ClientState {

    Set<TaskId> assignedTasks() {
        // Since we're copying it, it's not strictly necessary to make it unmodifiable also.
        // I'm just trying to prevent subtle bugs if we write code that thinks it can update
        // the assignment by updating the returned set.
        return unmodifiableSet(
            union(
                () -> new HashSet<>(activeTasks.size() + standbyTasks.size()),
                activeTasks,
                standbyTasks
            )
        );
    }

    public  ClientState();
      ClientState(final int capacity);
    public  ClientState(final Set<TaskId> previousActiveTasks,
                       final Set<TaskId> previousStandbyTasks,
                       final Map<TaskId, Long> taskLagTotals,
                       final int capacity);

}