All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opensearch.index.replication.TestReplicationSource Maven / Gradle / Ivy

There is a newer version: 2.18.0
Show newest version
/*
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 */

package org.opensearch.index.replication;

import org.opensearch.core.action.ActionListener;
import org.opensearch.index.shard.IndexShard;
import org.opensearch.index.store.StoreFileMetadata;
import org.opensearch.indices.replication.CheckpointInfoResponse;
import org.opensearch.indices.replication.GetSegmentFilesResponse;
import org.opensearch.indices.replication.SegmentReplicationSource;
import org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint;

import java.util.List;
import java.util.function.BiConsumer;

/**
 * This class is used by unit tests implementing SegmentReplicationSource
 */
public abstract class TestReplicationSource implements SegmentReplicationSource {

    @Override
    public abstract void getCheckpointMetadata(
        long replicationId,
        ReplicationCheckpoint checkpoint,
        ActionListener listener
    );

    @Override
    public abstract void getSegmentFiles(
        long replicationId,
        ReplicationCheckpoint checkpoint,
        List filesToFetch,
        IndexShard indexShard,
        BiConsumer fileProgressTracker,
        ActionListener listener
    );

    @Override
    public String getDescription() {
        return "This is a test description";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy