ProtectedconstructorStaticInstanceThe process-wide registry.
Forgets every cached offer (tests, shutdown).
Moves a pending offer to Expired or Cancelled (a system decision, not the person's).
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderThe offer when it was pending and has now changed; undefined when it was already resolved or unknown.
Creates a pending offer. Refuses when the person already has MAX_PENDING_OFFERS_PER_USER pending.
The new offer, or undefined when the person's pending-offer cap is reached.
The offers made from one room, any status.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderThe offer with this id, or undefined.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderThe Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
The person's offers to show: pending ones, plus ones resolved recently enough to still be retained.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderThe person's offers that can still be accepted, soonest to expire first.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderMoves a pending offer to a terminal status on behalf of the person it was made to. The caller must be the offer's target and the offer must still be pending and unexpired; anything else answers the same way.
Compares and sets atomically in a transaction on Status = 'Pending' so concurrent requests across
multiple instances cannot both succeed.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderReplaces the clock (tests).
Stops the periodic background sweep timer (shutdown, tests).
Sweeps expired pending offers and purges retained resolved offers.
OptionalcontextUser: UserInfoOptionalprovider: IMetadataProviderHow many pending offers were expired by this sweep.
Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: string
Holds handoff offers in
MJ: Interaction Offerswith in-memory caching and compare-and-set concurrency guards.