shz.cache.CacheParam Maven / Gradle / Ivy
package shz.cache;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
public class CacheParam {
protected CacheOperate operate;
protected long time;
protected TimeUnit unit = TimeUnit.MILLISECONDS;
protected long timeoutMills = 2000L;
protected int nullKeySeconds = 120;
protected long ttlFlushMills;
protected String key;
protected String[] keys;
public CacheOperate getOperate() {
return operate;
}
public void setOperate(CacheOperate operate) {
this.operate = operate;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public TimeUnit getUnit() {
return unit;
}
public void setUnit(TimeUnit unit) {
this.unit = unit;
}
public long getTimeoutMills() {
return timeoutMills;
}
public void setTimeoutMills(long timeoutMills) {
this.timeoutMills = timeoutMills;
}
public int getNullKeySeconds() {
return nullKeySeconds;
}
public void setNullKeySeconds(int nullKeySeconds) {
this.nullKeySeconds = nullKeySeconds;
}
public long getTtlFlushMills() {
return ttlFlushMills;
}
public void setTtlFlushMills(long ttlFlushMills) {
this.ttlFlushMills = ttlFlushMills;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String[] getKeys() {
return keys;
}
public void setKeys(String[] keys) {
this.keys = keys;
}
@Override
public String toString() {
return "CacheParam{" +
"operate=" + operate +
", time=" + time +
", unit=" + unit +
", timeoutMills=" + timeoutMills +
", nullKeySeconds=" + nullKeySeconds +
", ttlFlushMills=" + ttlFlushMills +
", key='" + key + '\'' +
", keys=" + Arrays.toString(keys) +
'}';
}
}