View source on GitHub |
A policy that always gives the same sequence of consistency decisions.
Inherits From: BaseHighReplicationConsistencyPolicy
, BaseConsistencyPolicy
, expected_type
google.appengine.datastore.datastore_stub_util.PseudoRandomHRConsistencyPolicy(
probability=None, seed=0
)
Args | |
---|---|
probability
|
A number between 0 and 1 that is the likelihood of a transaction applying before a global query is executed. |
seed
|
A hashable object to use as a seed. Use None to use the current timestamp. |
Attributes | |
---|---|
probability
|
Return the probability of applying a job. |
random_seed
|
Return the random seed. |
Methods
SetProbability
SetProbability(
probability
)
Change the probability of a transaction applying.
Args | |
---|---|
probability
|
A number between 0 and 1 that determines the probability of a transaction applying before a global query is run. |
SetSeed
SetSeed(
seed
)
Reset the seed.