public final class ConsistencyPolicy extends JsonSerializable
| Constructor and Description |
|---|
ConsistencyPolicy(org.json.JSONObject jsonObject)
Constructor.
|
ConsistencyPolicy(String jsonString)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ConsistencyLevel |
getDefaultConsistencyLevel()
Get the name of the resource.
|
int |
getMaxStalenessIntervalInSeconds()
Gets the in bounded staleness consistency, the maximum allowed staleness in terms time interval.
|
int |
getMaxStalenessPrefix()
Gets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers
(aka version).
|
void |
setDefaultConsistencyLevel(ConsistencyLevel level)
Set the name of the resource.
|
void |
setMaxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds)
Sets the in bounded staleness consistency, the maximum allowed staleness in terms time interval.
|
void |
setMaxStalenessPrefix(int maxStalenessPrefix)
Sets the bounded staleness consistency, the maximum allowed staleness in terms difference in sequence numbers
(aka version).
|
get, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toStringpublic ConsistencyPolicy(String jsonString)
jsonString - the json string that represents the consistency policy.public ConsistencyPolicy(org.json.JSONObject jsonObject)
jsonObject - the json object that represents the consistency policy.public ConsistencyLevel getDefaultConsistencyLevel()
public void setDefaultConsistencyLevel(ConsistencyLevel level)
level - the consistency level.public int getMaxStalenessPrefix()
public void setMaxStalenessPrefix(int maxStalenessPrefix)
maxStalenessPrefix - the max staleness prefix.public int getMaxStalenessIntervalInSeconds()
public void setMaxStalenessIntervalInSeconds(int maxStalenessIntervalInSeconds)
maxStalenessIntervalInSeconds - the max staleness interval in seconds.Copyright © 2018. All rights reserved.