001package org.apache.archiva.indexer.merger;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022/**
023 * @author Olivier Lamy
024 * @since 2.0.0
025 */
026public class MergedRemoteIndexesTaskRequest
027{
028    private IndexMergerRequest indexMergerRequest;
029
030    private IndexMerger indexMerger;
031
032    public MergedRemoteIndexesTaskRequest( IndexMergerRequest indexMergerRequest, IndexMerger indexMerger )
033    {
034        this.indexMergerRequest = indexMergerRequest;
035        this.indexMerger = indexMerger;
036    }
037
038    public IndexMergerRequest getIndexMergerRequest()
039    {
040        return indexMergerRequest;
041    }
042
043    public void setIndexMergerRequest( IndexMergerRequest indexMergerRequest )
044    {
045        this.indexMergerRequest = indexMergerRequest;
046    }
047
048    public IndexMerger getIndexMerger()
049    {
050        return indexMerger;
051    }
052
053    public void setIndexMerger( IndexMerger indexMerger )
054    {
055        this.indexMerger = indexMerger;
056    }
057
058    @Override
059    public boolean equals( Object o )
060    {
061        if ( this == o )
062        {
063            return true;
064        }
065        if ( o == null || getClass() != o.getClass() )
066        {
067            return false;
068        }
069
070        MergedRemoteIndexesTaskRequest that = (MergedRemoteIndexesTaskRequest) o;
071
072        return indexMergerRequest.equals( that.indexMergerRequest );
073    }
074
075    @Override
076    public int hashCode()
077    {
078        return indexMergerRequest.hashCode();
079    }
080}