cn.ipokerface.snowflake.SnowflakeProperties Maven / Gradle / Ivy
Show all versions of snowflake-id-generator-spring Show documentation
package cn.ipokerface.snowflake;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Created by PokerFace
* Create Date 2021/4/7.
* Email:
* Version 1.0.0
*
* Description:
*/
@ConfigurationProperties(prefix = "spring.snowflake")
public class SnowflakeProperties {
private String cacheKey = "SNOWFLAKE_CACHE:";
private long datacenterId;
private long epochTimestamp = 1609430400000L;
public long getDatacenterId() {
return datacenterId;
}
public void setDatacenterId(long datacenterId) {
this.datacenterId = datacenterId;
}
public String getCacheKey() {
return cacheKey;
}
public void setCacheKey(String cacheKey) {
this.cacheKey = cacheKey;
}
public long getEpochTimestamp() {
return epochTimestamp;
}
public void setEpochTimestamp(long epochTimestamp) {
this.epochTimestamp = epochTimestamp;
}
}