Encapsulates the state of a fence in AwarenessFence.
The state includes the current and previous evaluation state and time of the last fence state
update.
| int | FALSE | Fence state is false. |
| int | TRUE | Fence state is true. |
| int | UNKNOWN | Fence state is unknown, which can be due to no data received. |
| static FenceState | |
| abstract int |
getCurrentState()
Returns the current fence state.
|
| abstract String |
getFenceKey()
Returns the fence key that identifies this fence in
AwarenessFence.
|
| abstract long |
getLastFenceUpdateTimeMillis()
Returns the last time the fence state was changed in milliseconds since epoch.
|
| abstract int |
getPreviousState()
Returns the previous fence state.
|
Fence state is false.
Fence state is true.
Fence state is unknown, which can be due to no data received.
Extracts the fence state details from the intent.
| intent | The Intent
object received from registering a fence. |
|---|
Returns the current fence state.
AwarenessFence.
Returns the fence key that identifies this fence in AwarenessFence.
AwarenessFence.
It is the same identifier that was used by the client to register the fence. This
value may also be provided as part of the FenceQueryRequest.Returns the last time the fence state was changed in milliseconds since epoch.
Returns the previous fence state.
AwarenessFence.
TRUE
indicates that the previous state of fence evaluation was true.
FALSE indicates that the previous state of fence evaluation was
false.
UNKNOWN indicates an unknown previous fence evaluation state. This may
be due to a variety of reasons such as fence data not evaluated, nondeterministic
state of a particular context etc.