mirror of
https://github.com/samsonjs/media.git
synced 2026-04-06 11:25:46 +00:00
Group overloaded method together.
PiperOrigin-RevId: 323806853
This commit is contained in:
parent
867d45ca62
commit
d6ee5b84d3
1 changed files with 14 additions and 14 deletions
|
|
@ -292,6 +292,20 @@ public final class PlayerMessage {
|
|||
return isDelivered;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the message as processed. Should only be called by a {@link Sender} and may be called
|
||||
* multiple times.
|
||||
*
|
||||
* @param isDelivered Whether the message has been delivered to its target. The message is
|
||||
* considered as being delivered when this method has been called with {@code isDelivered} set
|
||||
* to true at least once.
|
||||
*/
|
||||
public synchronized void markAsProcessed(boolean isDelivered) {
|
||||
this.isDelivered |= isDelivered;
|
||||
isProcessed = true;
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Blocks until after the message has been delivered or the player is no longer able to deliver
|
||||
* the message or the specified waiting time elapses.
|
||||
|
|
@ -314,20 +328,6 @@ public final class PlayerMessage {
|
|||
return experimental_blockUntilDelivered(timeoutMs, Clock.DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the message as processed. Should only be called by a {@link Sender} and may be called
|
||||
* multiple times.
|
||||
*
|
||||
* @param isDelivered Whether the message has been delivered to its target. The message is
|
||||
* considered as being delivered when this method has been called with {@code isDelivered} set
|
||||
* to true at least once.
|
||||
*/
|
||||
public synchronized void markAsProcessed(boolean isDelivered) {
|
||||
this.isDelivered |= isDelivered;
|
||||
isProcessed = true;
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
@VisibleForTesting()
|
||||
/* package */ synchronized boolean experimental_blockUntilDelivered(long timeoutMs, Clock clock)
|
||||
throws InterruptedException, TimeoutException {
|
||||
|
|
|
|||
Loading…
Reference in a new issue