package meerkat.bulletinboard.workers.multiserver;

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

import java.util.List;


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

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

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

    }

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


}
