com.alibaba.rsqldb.storage.api.Command Maven / Gradle / Ivy
The newest version!
/*
* Copyright 1999-2023 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.rsqldb.storage.api;
import com.alibaba.rsqldb.parser.model.Node;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class Command {
private String jobId;
private Node node;
private CommandStatus status;
@JsonCreator
public Command(@JsonProperty("jobId") String jobId,
@JsonProperty("node") Node node,
@JsonProperty("status") CommandStatus status) {
this.jobId = jobId;
this.node = node;
this.status = status;
}
public String getJobId() {
return jobId;
}
public void setJobId(String jobId) {
this.jobId = jobId;
}
public Node getNode() {
return node;
}
public void setNode(Node node) {
this.node = node;
}
public CommandStatus getStatus() {
return status;
}
public void setStatus(CommandStatus status) {
this.status = status;
}
@Override
public String toString() {
return "Command{" +
"jobId='" + jobId + '\'' +
", node=[" + node.getContent() +
"], status=" + status +
'}';
}
}