java.lang.Object | ||
↳ | edu.stanford.junction.api.activity.JunctionExtra | |
↳ | edu.stanford.junction.props2.Prop |
Known Direct Subclasses |
Known Indirect Subclasses |
Note: The use of 'synchronized' is very deliberate. If you want to access the state of the prop, you must use the withState callback, which serializes your state read with respect to state changes resulting from addOperation or handleMessage.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | COMPRESS_STATE_SYNC | ||||||||||
String | EVT_ANY | ||||||||||
String | EVT_CHANGE | ||||||||||
String | EVT_SYNC | ||||||||||
int | MODE_NORM | ||||||||||
int | MODE_SYNC | ||||||||||
int | MSG_HELLO | ||||||||||
int | MSG_I_HAVE_STATE | ||||||||||
int | MSG_SEND_ME_STATE | ||||||||||
int | MSG_STATE_OPERATION | ||||||||||
int | MSG_STATE_SYNC | ||||||||||
int | MSG_WHO_HAS_STATE |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
active | |||||||||||
bestSyncSeqNum | |||||||||||
changeListeners | |||||||||||
cleanState | |||||||||||
enableChangeEvents | |||||||||||
lastOpUUID | |||||||||||
mode | |||||||||||
opsSYNC | |||||||||||
pendingLocals | |||||||||||
propName | |||||||||||
propReplicaName | |||||||||||
propStats | |||||||||||
sequenceNum | |||||||||||
staleness | |||||||||||
state | |||||||||||
syncId | |||||||||||
taskTimer | |||||||||||
timeOfLastHello | |||||||||||
timeOfLastSyncRequest | |||||||||||
uuid |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add an operation to the state managed by this Prop, with prediction
| |||||||||||
Returns true if the normal event handling should proceed;
Return false to stop cascading.
| |||||||||||
The name of the prop at large.
| |||||||||||
The internal counter that tracks how many operations
have been executed on this prop's state.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
What to do with a newly arrived operation? Depends on mode of
operation.
| |||||||||||
Install state received from peer.
| |||||||||||
Send a message to all prop-replicas in this prop
| |||||||||||
Send a message to the prop-replica hosted at the given actorId.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
edu.stanford.junction.api.activity.JunctionExtra
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
edu.stanford.junction.props2.IProp
|
Add an operation to the state managed by this Prop, with prediction
Returns true if the normal event handling should proceed; Return false to stop cascading.
The internal counter that tracks how many operations have been executed on this prop's state. For a given state, this number should be the same at all peers.
What to do with a newly arrived operation? Depends on mode of operation. Note, we must take care to make sure there is no sharing between this.cleanState and this.state. This means copying operations that must be applied to both states!
Send a message to the prop-replica hosted at the given actorId.