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 MultiServerPostMessageWorker extends MultiServerGenericPostWorker<BulletinBoardMessage> {

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

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

    }

    @Override
    protected void doPost(SingleServerBulletinBoardClient client, BulletinBoardMessage payload) {
        client.postMessage(payload, this);
    }


}
