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

cn.hyperchain.sdk.service.ArchiveService Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package cn.hyperchain.sdk.service;

import cn.hyperchain.sdk.request.Request;
import cn.hyperchain.sdk.response.archive.ArchiveBoolResponse;
import cn.hyperchain.sdk.response.archive.ArchiveFilterIdResponse;
import cn.hyperchain.sdk.response.archive.ArchiveResponse;
import cn.hyperchain.sdk.response.archive.ArchiveStringResponse;
import cn.hyperchain.sdk.response.archive.ArchiveLatestResponse;

import java.math.BigInteger;

public interface ArchiveService {

    /**
     * @see ArchiveService#snapshot(String, int...)
     */
    @Deprecated
    Request snapshot(BigInteger blockNumber, int... nodeIds);

    /**
     * make snapshot.
     *
     * @param blockNumber block number
     * @param nodeIds     specific ids
     * @return {@link Request} of {@link ArchiveFilterIdResponse}
     */
    @Deprecated
    Request snapshot(String blockNumber, int... nodeIds);

    /**
     * check if the snapshot exists.
     *
     * @param filterId filter id
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request querySnapshotExist(String filterId, int... nodeIds);

    /**
     * check if the snapshot is correct.
     *
     * @param filterId filter id
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request checkSnapshot(String filterId, int... nodeIds);

    /**
     * delete snapshot.
     *
     * @param filterId filter id
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request deleteSnapshot(String filterId, int... nodeIds);

    /**
     * list snapshot.
     *
     * @param nodeIds specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    Request listSnapshot(int... nodeIds);

    /**
     * read snapshot.
     *
     * @param filterId filter id
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request readSnapshot(String filterId, int... nodeIds);

    /**
     * data archive.
     *
     * @param filterId filter id
     * @param sync     if synchronization
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request archive(String filterId, boolean sync, int... nodeIds);

    /**
     * direct archive.
     *
     * @param blkNumber block number
     * @param nodeIds   specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    Request archiveNoPredict(BigInteger blkNumber, int... nodeIds);

    /**
     * restore data from archive.
     *
     * @param filterId filter id
     * @param sync     if synchronization
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request restore(String filterId, boolean sync, int... nodeIds);

    /**
     * restore all data.
     *
     * @param sync    if synchronization
     * @param nodeIds specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    @Deprecated
    Request restoreAll(boolean sync, int... nodeIds);

    /**
     * query archive.
     *
     * @param filterId filter id
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    Request queryArchive(String filterId, int... nodeIds);

    /**
     * query latest archive.
     *
     * @param nodeIds  specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    Request queryLatestArchive(int... nodeIds);

    /**
     * read pending archives.
     *
     * @param nodeIds specific ids
     * @return {@link Request} of {@link ArchiveResponse}
     */
    @Deprecated
    Request pending(int... nodeIds);

    /**
     * query archive exist.
     * @param filterId filter id
     * @param nodeIds specific ids
     * @return {@link Request} of {@link ArchiveBoolResponse}
     */
    Request queryArchiveExist(String filterId, int... nodeIds);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy