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

shz.cache.CacheParam Maven / Gradle / Ivy

There is a newer version: 1.2.8
Show newest version
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) +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy