Skip to content

Commit

Permalink
新建版本的slowlog index log等增加为0校验,为0当-1处理 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
jaminlai committed Jan 31, 2019
1 parent 3310eff commit bbf2c86
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down Expand Up @@ -73,6 +74,7 @@ public class IndexVersionVO implements Serializable {

private Long querySlowThreshold;

@Positive(message = "refresh interval必须大于0")
private Byte refreshInterval;

public Long getId() {
Expand Down Expand Up @@ -208,6 +210,9 @@ public Long getIndexSlowThreshold() {
}

public void setIndexSlowThreshold(Long indexSlowThreshold) {
if(indexSlowThreshold == 0){
indexSlowThreshold = -1L;
}
this.indexSlowThreshold = indexSlowThreshold;
}

Expand All @@ -216,6 +221,9 @@ public Long getFetchSlowThreshold() {
}

public void setFetchSlowThreshold(Long fetchSlowThreshold) {
if(fetchSlowThreshold == 0){
fetchSlowThreshold = -1L;
}
this.fetchSlowThreshold = fetchSlowThreshold;
}

Expand All @@ -224,6 +232,9 @@ public Long getQuerySlowThreshold() {
}

public void setQuerySlowThreshold(Long querySlowThreshold) {
if(querySlowThreshold == 0){
querySlowThreshold = -1L;
}
this.querySlowThreshold = querySlowThreshold;
}

Expand Down

0 comments on commit bbf2c86

Please sign in to comment.