public class PooledCompletes extends Object implements CompletesEventually
| Modifier and Type | Field and Description |
|---|---|
Returns<Object> |
clientReturns |
CompletesEventually |
completesEventually |
long |
id |
| Constructor and Description |
|---|
PooledCompletes(long id,
Returns<?> clientReturns,
CompletesEventually completesEventually) |
| Modifier and Type | Method and Description |
|---|---|
Address |
address() |
void |
conclude()
Concludes the receiver, eventually causing
it to receive a stop() message.
|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
isStopped()
Answer whether or not the receiver is stopped.
|
Object |
outcome() |
void |
stop()
Causes the receiver to stop reacting to messages and to eventually
be garbage collected.
|
String |
toString() |
void |
with(Object outcome) |
public final CompletesEventually completesEventually
public final long id
public PooledCompletes(long id,
Returns<?> clientReturns,
CompletesEventually completesEventually)
public Address address()
address in interface CompletesEventuallypublic Object outcome()
public void with(Object outcome)
with in interface CompletesEventuallypublic void conclude()
Stoppableconclude in interface CompletesEventuallyconclude in interface Stoppablepublic boolean isStopped()
StoppableisStopped in interface CompletesEventuallyisStopped in interface Stoppablepublic void stop()
StoppableNote that the contract of stop() is to suspend the receivers mailbox deliveries, which will prevent further processing. To arrange for eventually stopping the receiver send conclude(), which will then cause stop(). In essence the conclude() marks the mailbox for ending operations, but allows messages already queued to first be delivered.
stop in interface CompletesEventuallystop in interface StoppableCopyright © 2021. All rights reserved.