|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FlowStateIdGenerator
An interface for objects that generate flow state IDs. Might be used by
various FlowStateStorage
implementations.
Method Summary | |
---|---|
boolean |
dependsOnContinuation()
Returns true if the return value of generateStateId(NativeContinuation)
depends on the passed state (that is, for a given state object, it will
always return the same ID). |
java.lang.Long |
generateStateId(org.mozilla.javascript.NativeContinuation state)
Generate the flow state id for the specified state. |
Method Detail |
---|
java.lang.Long generateStateId(org.mozilla.javascript.NativeContinuation state)
state
-
boolean dependsOnContinuation()
generateStateId(NativeContinuation)
depends on the passed state (that is, for a given state object, it will
always return the same ID). Implementations of the interface that
implement counters or random generators will return false.
Implementations that use some information contained in the continuation
will return true. If an implementation returns true, then returning an
ID equal to an existing state's ID might cause the user of the class to
overwrite the existing ID. If an implementation returns false, the user
of the class is encouraged to invoke the
generateStateId(NativeContinuation)
method repeatedly until it
receives a non-conflicting ID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |