Persistence Class
- java.
lang. Object - com.
azure. resourcemanager. redisenterprise. models. Persistence
- com.
Implements
public final class Persistence
implements JsonSerializable<Persistence>
Persistence settings Persistence-related configuration for the Redis Enterprise database.
Constructor Summary
| Constructor | Description |
|---|---|
| Persistence() |
Creates an instance of Persistence class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Boolean |
aofEnabled()
Get the aof |
|
Aof |
aofFrequency()
Get the aof |
| static Persistence |
fromJson(JsonReader jsonReader)
Reads an instance of Persistence from the Json |
| Boolean |
rdbEnabled()
Get the rdb |
|
Rdb |
rdbFrequency()
Get the rdb |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
| Persistence |
withAofEnabled(Boolean aofEnabled)
Set the aof |
| Persistence |
withAofFrequency(AofFrequency aofFrequency)
Set the aof |
| Persistence |
withRdbEnabled(Boolean rdbEnabled)
Set the rdb |
| Persistence |
withRdbFrequency(RdbFrequency rdbFrequency)
Set the rdb |
Methods inherited from java.lang.Object
Constructor Details
Persistence
public Persistence()
Creates an instance of Persistence class.
Method Details
aofEnabled
public Boolean aofEnabled()
Get the aofEnabled property: Sets whether AOF is enabled. Note that at most one of AOF or RDB persistence may be enabled.
Returns:
aofFrequency
public AofFrequency aofFrequency()
Get the aofFrequency property: Sets the frequency at which data is written to disk. Defaults to '1s', meaning 'every second'. Note that the 'always' setting is deprecated, because of its performance impact.
Returns:
fromJson
public static Persistence fromJson(JsonReader jsonReader)
Reads an instance of Persistence from the JsonReader.
Parameters:
Returns:
Throws:
rdbEnabled
public Boolean rdbEnabled()
Get the rdbEnabled property: Sets whether RDB is enabled. Note that at most one of AOF or RDB persistence may be enabled.
Returns:
rdbFrequency
public RdbFrequency rdbFrequency()
Get the rdbFrequency property: Sets the frequency at which a snapshot of the database is created.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAofEnabled
public Persistence withAofEnabled(Boolean aofEnabled)
Set the aofEnabled property: Sets whether AOF is enabled. Note that at most one of AOF or RDB persistence may be enabled.
Parameters:
Returns:
withAofFrequency
public Persistence withAofFrequency(AofFrequency aofFrequency)
Set the aofFrequency property: Sets the frequency at which data is written to disk. Defaults to '1s', meaning 'every second'. Note that the 'always' setting is deprecated, because of its performance impact.
Parameters:
Returns:
withRdbEnabled
public Persistence withRdbEnabled(Boolean rdbEnabled)
Set the rdbEnabled property: Sets whether RDB is enabled. Note that at most one of AOF or RDB persistence may be enabled.
Parameters:
Returns:
withRdbFrequency
public Persistence withRdbFrequency(RdbFrequency rdbFrequency)
Set the rdbFrequency property: Sets the frequency at which a snapshot of the database is created.
Parameters:
Returns: