org.mpisws.p2p.transport.identity
Class IdentityImpl<UpperIdentifier,UpperMsgType,LowerIdentifier>
java.lang.Object
org.mpisws.p2p.transport.identity.IdentityImpl<UpperIdentifier,UpperMsgType,LowerIdentifier>
public class IdentityImpl<UpperIdentifier,UpperMsgType,LowerIdentifier>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localIdentifier
protected byte[] localIdentifier
lower
protected org.mpisws.p2p.transport.identity.IdentityImpl.LowerIdentityImpl lower
upper
protected org.mpisws.p2p.transport.identity.IdentityImpl.UpperIdentityImpl upper
pendingMessages
protected java.util.Map<UpperIdentifier,java.util.Set<org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle>> pendingMessages
deadForever
protected java.util.Set<UpperIdentifier> deadForever
environment
protected Environment environment
logger
protected Logger logger
serializer
protected IdentitySerializer<UpperIdentifier> serializer
nodeChangeStrategy
protected NodeChangeStrategy<UpperIdentifier,LowerIdentifier> nodeChangeStrategy
bindings
protected java.util.Map<LowerIdentifier,java.util.List<UpperIdentifier>> bindings
- Multiple UpperIdentifiers claim the same binding to the
LowerIdentifier.
If these are unrelated nodes (different ID/credentials) we need to
make sure to expire the node first. If they are the same node, and
just a new epoch, then we can exprie them right away.
Note, that it's possible to have the UpperIdentifier in multiple places if it
has multiple paths (such as source routing)
reverseBinding
protected java.util.Map<UpperIdentifier,java.util.List<LowerIdentifier>> reverseBinding
- Used to delete bindings in setDead()/setDeadForever()
SUCCESS
public static final byte SUCCESS
- See Also:
- Constant Field Values
FAILURE
public static final byte FAILURE
- See Also:
- Constant Field Values
NO_ID
public static final byte NO_ID
- See Also:
- Constant Field Values
NORMAL
public static final byte NORMAL
- See Also:
- Constant Field Values
INCORRECT_IDENTITY
public static final byte INCORRECT_IDENTITY
- See Also:
- Constant Field Values
NODE_HANDLE_INDEX
public static final java.lang.String NODE_HANDLE_INDEX
- See Also:
- Constant Field Values
IdentityImpl
public IdentityImpl(byte[] localIdentifier,
IdentitySerializer<UpperIdentifier> serializer,
NodeChangeStrategy<UpperIdentifier,LowerIdentifier> nodeChangeStrategy,
Environment environment)
addPendingMessage
public void addPendingMessage(UpperIdentifier i,
org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle ret)
setDeadForever
public void setDeadForever(UpperIdentifier i)
addIntendedDest
protected int addIntendedDest(UpperIdentifier i)
- Returns the identifier.
- Parameters:
i
-
- Returns:
addBinding
protected void addBinding(UpperIdentifier u,
LowerIdentifier l)
deleteBindings
protected void deleteBindings(UpperIdentifier i)
initLowerLayer
public void initLowerLayer(TransportLayer<LowerIdentifier,java.nio.ByteBuffer> tl)
getLowerIdentity
public LowerIdentity<LowerIdentifier,java.nio.ByteBuffer> getLowerIdentity()
getUpperIdentity
public UpperIdentity<UpperIdentifier,UpperMsgType> getUpperIdentity()
initUpperLayer
public void initUpperLayer(TransportLayer<UpperIdentifier,UpperMsgType> tl,
LivenessProvider<UpperIdentifier> live,
ProximityProvider<UpperIdentifier> prox)
Copyright © 2001-2005 - Rice Pastry.