|
YAACC - UPNP Client and Server
|
Lets only ONE picked action be between its confirm and its end. More...

Classes | |
| class | Ticket |
| One begun action. More... | |
Public Member Functions | |
| ActionFlight (LongSupplier nowMillis, long maxMillis) | |
| synchronized Ticket | tryBegin () |
| synchronized boolean | isActive () |
Static Public Member Functions | |
| static ActionFlight | createDefault () |
The process-wide flight on the monotonic system clock, lasting at most ShareLimits#ACTION_FLIGHT_MAX_MILLIS. | |
Lets only ONE picked action be between its confirm and its end.
The receiver selection that a picked action stores (UpnpClient#setReceiverDeviceIds) is global and read back later by the player service; a second action that confirmed meanwhile would replace it, or the first action's clearing would wipe it. While a flight is active no other action may begin, so the selection is only ever the active action's. Plain Java, thread-safe.
A flight that is never ended (a lost callback) expires after maxMillis, so one bug cannot block picking for good; a stale Ticket of such a flight cannot end the next one.
| de.yaacc.share.ActionFlight.ActionFlight | ( | LongSupplier | nowMillis, |
| long | maxMillis ) |
| nowMillis | a monotonic clock in milliseconds |
| maxMillis | how long a flight may last before it counts as lost, greater than zero |
Referenced by de.yaacc.share.ActionFlight.createDefault().

| synchronized boolean de.yaacc.share.ActionFlight.isActive | ( | ) |
| synchronized Ticket de.yaacc.share.ActionFlight.tryBegin | ( | ) |
Referenced by de.yaacc.share.GuardedPickedAction.onConfirmed().
