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

org.scassandra.http.client.UnpreparedConfig Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package org.scassandra.http.client;

import java.util.Map;

import com.google.common.collect.ImmutableMap;
import org.scassandra.server.priming.ErrorConstants;

public class UnpreparedConfig extends Config {

    private String prepareId;

    private String message;

    public UnpreparedConfig(String prepareId) {
        this(prepareId, null);
    }

    public UnpreparedConfig(String prepareId, String message) {
        this.prepareId = prepareId;
        this.message = message;
    }

    @Override
    Map getProperties() {
        ImmutableMap.Builder mapBuilder = ImmutableMap.builder();
        mapBuilder.put(ErrorConstants.PrepareId(), prepareId);
        if(message != null) {
            mapBuilder.put(ErrorConstants.Message(), message);
        }
        return mapBuilder.build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy