* handle UID incarnations, shared association state that can be swapped
for new handshakes
* detect that message comes from unknown origin and then initiate new
handshake (handled by InboundHandshake stage)
* simplify the OutboundHandshake stage
* doesn't have to listen for HandshakeRsp replies, it can just listen
to when the uniqueRemoteAddress future is completed, InboundHandshake
stage completes the handshake when it receives HandshakeRsp
* send the HandshakeReq via the control message ingress, instead of
pushing it downstreams, than also means that HandshakeReq is only sent
on the control stream, which is good
* materialization race condition
18 lines
474 B
Java
18 lines
474 B
Java
/**
|
|
* Copyright (C) 2016 Lightbend Inc. <http://www.lightbend.com>
|
|
*/
|
|
package akka.remote.artery;
|
|
|
|
import akka.util.Unsafe;
|
|
|
|
class AbstractAssociation {
|
|
protected final static long sharedStateOffset;
|
|
|
|
static {
|
|
try {
|
|
sharedStateOffset = Unsafe.instance.objectFieldOffset(Association.class.getDeclaredField("_sharedStateDoNotCallMeDirectly"));
|
|
} catch(Throwable t){
|
|
throw new ExceptionInInitializerError(t);
|
|
}
|
|
}
|
|
}
|