/* * Copyright (C) 2016, Google Inc. and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at * https://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: BSD-3-Clause */ package org.eclipse.jgit.internal.ketch; import java.util.Map; import java.util.Set; import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; /** * A fetch request to obtain objects from a replica, and its result. */ public class ReplicaFetchRequest { private final Set wantRefs; private final Set wantObjects; private Map refs; /** * Construct a new fetch request for a replica. * * @param wantRefs * named references to be fetched. * @param wantObjects * specific objects to be fetched. */ public ReplicaFetchRequest(Set wantRefs, Set wantObjects) { this.wantRefs = wantRefs; this.wantObjects = wantObjects; } /** * Get references to be fetched. * * @return references to be fetched. */ public Set getWantRefs() { return wantRefs; } /** * Get objects to be fetched. * * @return objects to be fetched. */ public Set getWantObjects() { return wantObjects; } /** * Get remote references, usually from the advertisement. * * @return remote references, usually from the advertisement. */ @Nullable public Map getRefs() { return refs; } /** * Set references observed from the replica. * * @param refs * references observed from the replica. */ public void setRefs(Map refs) { this.refs = refs; } }