Exceptional, Paused, Stopping| Modifier | Constructor and Description |
|---|---|
protected |
SharedRingBufferMailbox(Dispatcher dispatcher,
int mailboxSize,
boolean notifyOnSend) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close me.
|
int |
concurrencyCapacity()
Answer the total capacity for concurrent operations.
|
boolean |
isClosed()
Answer whether or not I am closed.
|
boolean |
isDelivering()
Answer whether or not I am currently delivering a message.
|
boolean |
isPreallocated()
Answer whether or not I am a
Mailbox with pre-allocated and reusable Message elements. |
boolean |
isSuspended()
Answer whether or not I am currently suspended.
|
int |
pendingMessages()
Answer the count of messages that have not yet been delivered.
|
Message |
receive()
Answer the next
Message that can be received. |
void |
resume(String name)
Recovers the previous operational mode, either active or suspended,
and if active resumes delivery.
|
void |
run() |
void |
send(Actor actor,
Class<?> protocol,
io.vlingo.xoom.common.SerializableConsumer<?> consumer,
Returns<?> returns,
String representation)
Arrange for
Message to be sent by setting the pre-allocated
and reusable element with the parameters. |
void |
send(Message message)
Arrange for
Message to be sent, which will generally
be delivered by another thread. |
void |
suspendExceptFor(String name,
Class<?>... overrides)
Suspend message deliver but allow any of the given
overrides
to pass through, essentially giving these priority. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSuspendedForprotected SharedRingBufferMailbox(Dispatcher dispatcher, int mailboxSize, boolean notifyOnSend)
public void close()
Mailboxpublic boolean isClosed()
Mailboxpublic boolean isDelivering()
MailboxisDelivering in interface Mailboxpublic boolean isPreallocated()
MailboxMailbox with pre-allocated and reusable Message elements.isPreallocated in interface Mailboxpublic int concurrencyCapacity()
MailboxconcurrencyCapacity in interface Mailboxpublic void resume(String name)
Mailboxresume() is required.
If the name is not the current suspended mode, its corresponding
overrides may be marked for removal after any later overrides are removed.public void send(Message message)
MailboxMessage to be sent, which will generally
be delivered by another thread. Exceptions to this rule are
for possible, such as for TestMailbox.public void suspendExceptFor(String name, Class<?>... overrides)
Mailboxoverrides
to pass through, essentially giving these priority. Note that the
receiving Actor must use resume() to cause normally delivery
when it is ready.
NOTE: If suspendExceptFor(overrides) is used multiple times before
the implementing Mailbox is resumed, the outcome is implementation
dependent. The implementor may accumulate or replace its internal
overrides with the overrides parameter. The name may be helpful
in maintaining accumulated overrides.
suspendExceptFor in interface Mailboxname - String the name of the specific overrideoverrides - the varargs Class<?> that are allowed to be delivered although others are suspendedpublic boolean isSuspended()
MailboxisSuspended in interface Mailboxpublic void send(Actor actor, Class<?> protocol, io.vlingo.xoom.common.SerializableConsumer<?> consumer, Returns<?> returns, String representation)
MailboxMessage to be sent by setting the pre-allocated
and reusable element with the parameters. This manner of sending
is meant to be used only when isPreallocated() answers true.send in interface Mailboxactor - the Actor being sent the messageprotocol - the Class<?> type of Actor protocolconsumer - the Consumer<?> to carry out the actionreturns - the Returns<?> through which return values are communicated; null if void returnrepresentation - the String representation of this message invocationpublic Message receive()
MailboxMessage that can be received.public int pendingMessages()
MailboxpendingMessages in interface MailboxCopyright © 2021. All rights reserved.