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

com.instaclustr.icarus.operations.flush.FlushOperationRequest Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.instaclustr.icarus.operations.flush;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.MoreObjects;
import com.instaclustr.operations.OperationRequest;

public class FlushOperationRequest extends OperationRequest {

    @NotEmpty
    public String keyspace;

    public Set tables;

    public FlushOperationRequest(@NotNull final String keyspace, final Set tables) {
        this("flush", keyspace, tables);
    }

    @JsonCreator
    public FlushOperationRequest(@JsonProperty("type") final String type,
                                 @JsonProperty("keyspace") final String keyspace,
                                 @JsonProperty("tables") final Set tables) {
        this.keyspace = keyspace;
        this.tables = tables;
        this.type = type;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                          .add("keyspace", keyspace)
                          .add("tables", tables)
                          .toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy