<commit_before>/*
 * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.controller.cluster.datastore.persisted;

import static java.util.Objects.requireNonNull;

import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Collection;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
import org.opendaylight.controller.cluster.datastore.utils.ImmutableUnsignedLongSet;
import org.opendaylight.yangtools.concepts.Identifiable;
import org.opendaylight.yangtools.concepts.WritableObject;

public final class FrontendClientMetadata implements Identifiable<ClientIdentifier>, WritableObject {
    private final @NonNull ImmutableList<FrontendHistoryMetadata> currentHistories;
    private final @NonNull ImmutableUnsignedLongSet purgedHistories;
    private final @NonNull ClientIdentifier identifier;

    public FrontendClientMetadata(final ClientIdentifier identifier, final ImmutableUnsignedLongSet purgedHistories,
            final Collection<FrontendHistoryMetadata> currentHistories) {
        this.identifier = requireNonNull(identifier);
        this.purgedHistories = requireNonNull(purgedHistories);
        this.currentHistories = ImmutableList.copyOf(currentHistories);
    }

    public Collection<FrontendHistoryMetadata> getCurrentHistories() {
        return currentHistories;
    }

    public ImmutableUnsignedLongSet getPurgedHistories() {
        return purgedHistories;
    }

    @Override
    public ClientIdentifier getIdentifier() {<commit_msg>Expose ImmutableList from FrontendClientMetadata<commit_after>/*
 * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.controller.cluster.datastore.persisted;

import static java.util.Objects.requireNonNull;

import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableList;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Collection;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
import org.opendaylight.controller.cluster.datastore.utils.ImmutableUnsignedLongSet;
import org.opendaylight.yangtools.concepts.Identifiable;
import org.opendaylight.yangtools.concepts.WritableObject;

public final class FrontendClientMetadata implements Identifiable<ClientIdentifier>, WritableObject {
    private final @NonNull ImmutableList<FrontendHistoryMetadata> currentHistories;
    private final @NonNull ImmutableUnsignedLongSet purgedHistories;
    private final @NonNull ClientIdentifier identifier;

    public FrontendClientMetadata(final ClientIdentifier identifier, final ImmutableUnsignedLongSet purgedHistories,
            final Collection<FrontendHistoryMetadata> currentHistories) {
        this.identifier = requireNonNull(identifier);
        this.purgedHistories = requireNonNull(purgedHistories);
        this.currentHistories = ImmutableList.copyOf(currentHistories);
    }

    public ImmutableList<FrontendHistoryMetadata> getCurrentHistories() {
        return currentHistories;
    }

    public ImmutableUnsignedLongSet getPurgedHistories() {
        return purgedHistories;
    }

    @Override
    public ClientIdentifier getIdentifier() {
{'fraction_non_alphanumeric': 0.07244897959183673, 'fraction_numerical': 0.004081632653061225, 'mean_word_length': 5.283653846153846, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4561807', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1025, 'n_words': 239}