Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/main/java/com/aliyun/openservices/log/common/LogStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class LogStore implements Serializable {
private String telemetryType = "";
private EncryptConf encryptConf = null;
private int hotTTL = -1;
private String mode = null;

public int getArchiveSeconds() {
return archiveSeconds;
Expand Down Expand Up @@ -86,6 +87,7 @@ public LogStore(LogStore logStore) {
this.telemetryType = logStore.getTelemetryType();
this.encryptConf = logStore.encryptConf;
this.hotTTL = logStore.hotTTL;
this.mode = logStore.mode;
}

public long getPreserveStorage() {
Expand Down Expand Up @@ -210,6 +212,14 @@ public void setHotTTL(int hotTTL) {
this.hotTTL = hotTTL;
}

public int getMode() {
return mode;
}

public void setMode(int mode) {
this.mode = mode;
}

public JSONObject ToRequestJson() {
JSONObject logStoreDict = new JSONObject();
logStoreDict.put("logstoreName", GetLogStoreName());
Expand All @@ -233,6 +243,9 @@ public JSONObject ToRequestJson() {
{
logStoreDict.put("encrypt_conf", this.encryptConf.ToJsonObject());
}
if (mode != null) {
logStreDict.put("mode", mode);
}
return logStoreDict;
}

Expand Down Expand Up @@ -306,6 +319,10 @@ public void FromJsonObject(JSONObject dict) throws LogException {
{
this.hotTTL = dict.getInteger("hot_ttl");
}
if (dict.containsKey("mode"))
{
this.mode = dict.getString("mode");
}
} catch (JSONException e) {
throw new LogException("FailToGenerateLogStore", e.getMessage(), e, "");
}
Expand Down