package meerkat.bulletinboard.workers.multiserver;

import com.google.common.util.concurrent.FutureCallback;
import meerkat.bulletinboard.SingleServerBulletinBoardClient;
import meerkat.protobuf.BulletinBoardApi.BulletinBoardMessage;
import meerkat.protobuf.BulletinBoardApi.MessageID;

import java.util.List;


/**
 * Created by Arbel Deutsch Peled on 27-Dec-15.
 */
public class MultiServerReadMessageWorker extends MultiServerGenericReadWorker<MessageID, BulletinBoardMessage> {

    public MultiServerReadMessageWorker(List<SingleServerBulletinBoardClient> clients,
                                        int minServers, MessageID payload, int maxRetry,
                                        FutureCallback<BulletinBoardMessage> futureCallback) {

        super(clients, minServers, payload, maxRetry, futureCallback);

    }

    @Override
    protected void doRead(MessageID payload, SingleServerBulletinBoardClient client) {
        client.readMessage(payload, this);
    }


}
