public class Association extends java.lang.Object implements OutboundContext
Thread-safe, mutable holder for association state. Main entry point for remote destined message to a specific remote address.
| Modifier and Type | Class and Description |
|---|---|
static class |
Association.DisabledQueueWrapper$ |
static class |
Association.LazyQueueWrapper |
static class |
Association.LazyQueueWrapper$ |
static class |
Association.OutboundStreamMatValues |
static class |
Association.OutboundStreamMatValues$ |
static interface |
Association.QueueWrapper |
static class |
Association.QueueWrapperImpl |
static class |
Association.QueueWrapperImpl$ |
| Modifier and Type | Field and Description |
|---|---|
protected static long |
sharedStateOffset |
| Constructor and Description |
|---|
Association(ArteryTransport transport,
Materializer materializer,
Materializer controlMaterializer,
Address remoteAddress,
InboundControlJunction.ControlMessageSubject controlSubject,
WildcardIndex<NotUsed> largeMessageDestinations,
WildcardIndex<NotUsed> priorityMessageDestinations,
ObjectPool<ReusableOutboundEnvelope> outboundEnvelopePool) |
| Modifier and Type | Method and Description |
|---|---|
void |
associate()
Called once after construction when the
Association instance
wins the CAS in the AssociationRegistry. |
AssociationState |
associationState() |
scala.concurrent.Future<Done> |
changeActorRefCompression(CompressionTable<ActorRef> table) |
scala.concurrent.Future<Done> |
changeClassManifestCompression(CompressionTable<java.lang.String> table) |
scala.concurrent.Future<Done> |
completeHandshake(UniqueAddress peer) |
Materializer |
controlMaterializer() |
static int |
ControlQueueIndex() |
InboundControlJunction.ControlMessageSubject |
controlSubject()
An outbound stage can listen to control messages
via this observer subject.
|
java.util.Queue<OutboundEnvelope> |
createQueue(int capacity) |
static int |
LargeQueueIndex() |
UniqueAddress |
localAddress()
The local inbound address.
|
Materializer |
materializer() |
static int |
OrdinaryQueueIndex() |
OutboundControlJunction.OutboundControlIngress |
outboundControlIngress() |
void |
quarantine(java.lang.String reason) |
void |
quarantine(java.lang.String reason,
scala.Option<java.lang.Object> uid) |
Address |
remoteAddress()
The outbound address for this association.
|
void |
send(java.lang.Object message,
OptionVal<ActorRef> sender,
OptionVal<RemoteActorRef> recipient) |
void |
sendControl(ControlMessage message)
An inbound stage can send control message, e.g.
|
int |
sendTerminationHint(ActorRef replyTo) |
ArterySettings |
settings() |
scala.concurrent.Future<Done> |
streamsCompleted()
Exposed for orderly shutdown purposes, can not be trusted except for during shutdown as streams may restart.
|
java.lang.String |
toString() |
ArteryTransport |
transport() |
public Association(ArteryTransport transport, Materializer materializer, Materializer controlMaterializer, Address remoteAddress, InboundControlJunction.ControlMessageSubject controlSubject, WildcardIndex<NotUsed> largeMessageDestinations, WildcardIndex<NotUsed> priorityMessageDestinations, ObjectPool<ReusableOutboundEnvelope> outboundEnvelopePool)
public static final int ControlQueueIndex()
public static final int LargeQueueIndex()
public static final int OrdinaryQueueIndex()
public ArteryTransport transport()
public Materializer materializer()
public Materializer controlMaterializer()
public Address remoteAddress()
OutboundContextremoteAddress in interface OutboundContextpublic InboundControlJunction.ControlMessageSubject controlSubject()
OutboundContextcontrolSubject in interface OutboundContextpublic ArterySettings settings()
settings in interface OutboundContextpublic java.util.Queue<OutboundEnvelope> createQueue(int capacity)
public scala.concurrent.Future<Done> changeActorRefCompression(CompressionTable<ActorRef> table)
public scala.concurrent.Future<Done> changeClassManifestCompression(CompressionTable<java.lang.String> table)
public OutboundControlJunction.OutboundControlIngress outboundControlIngress()
public UniqueAddress localAddress()
OutboundContextlocalAddress in interface OutboundContextpublic AssociationState associationState()
associationState in interface OutboundContextpublic scala.concurrent.Future<Done> completeHandshake(UniqueAddress peer)
public void sendControl(ControlMessage message)
OutboundContextsendControl in interface OutboundContextmessage - (undocumented)public void send(java.lang.Object message,
OptionVal<ActorRef> sender,
OptionVal<RemoteActorRef> recipient)
public int sendTerminationHint(ActorRef replyTo)
public void quarantine(java.lang.String reason)
quarantine in interface OutboundContextpublic final void quarantine(java.lang.String reason,
scala.Option<java.lang.Object> uid)
public void associate()
Association instance
wins the CAS in the AssociationRegistry. It will materialize
the streams. It is possible to sending (enqueuing) to the association
before this method is called.
ShuttingDown - if called while the transport is shutting downpublic scala.concurrent.Future<Done> streamsCompleted()
public java.lang.String toString()
toString in class java.lang.Object