Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mpisws.p2p.transport.identity
Class IdentityImpl<UpperIdentifier,MiddleIdentifier,UpperMsgType,LowerIdentifier>

    java.lang.Object
      org.mpisws.p2p.transport.identity.IdentityImpl<UpperIdentifier,MiddleIdentifier,UpperMsgType,LowerIdentifier>

All Implemented Interfaces:
  LivenessTypes

    public class IdentityImpl<UpperIdentifier,MiddleIdentifier,UpperMsgType,LowerIdentifier>

extends java.lang.Object
implements LivenessTypes

Field Summary
`protected java.util.Map<MiddleIdentifier,UpperIdentifier>` | `bindings` Multiple UpperIdentifiers claim the same binding to the LowerIdentifier.
`protected java.util.Set<UpperIdentifier>` | `deadForever`
`static java.lang.String` | `DONT_VERIFY`
`protected Environment` | `environment`
`static byte` | `FAILURE`
`static byte` | `INCORRECT_IDENTITY`
`protected byte[]` | `localIdentifier`
`protected Logger` | `logger`
`protected org.mpisws.p2p.transport.identity.IdentityImpl.LowerIdentityImpl` | `lower`
`static byte` | `NO_ID`
`static java.lang.String` | `NODE_HANDLE_FROM_INDEX`
`protected NodeChangeStrategy<UpperIdentifier>` | `nodeChangeStrategy`
`static byte` | `NORMAL`
`protected java.util.Map<UpperIdentifier,java.util.Set<org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle>>` | `pendingMessages`
`protected SanityChecker<UpperIdentifier,MiddleIdentifier>` | `sanityChecker`
`protected IdentitySerializer<UpperIdentifier,MiddleIdentifier,LowerIdentifier>` | `serializer`
`static byte` | `SUCCESS`
`protected org.mpisws.p2p.transport.identity.IdentityImpl.UpperIdentityImpl` | `upper`

Fields inherited from interface org.mpisws.p2p.transport.liveness.LivenessTypes
`LIVENESS_ALIVE, LIVENESS_DEAD, LIVENESS_DEAD_FOREVER, LIVENESS_SUSPECTED`

Constructor Summary
`IdentityImpl(byte[] localIdentifier, IdentitySerializer<UpperIdentifier,MiddleIdentifier,LowerIdentifier> serializer, NodeChangeStrategy<UpperIdentifier> nodeChangeStrategy, SanityChecker<UpperIdentifier,MiddleIdentifier> sanityChecker, Environment environment)`

Method Summary
`protected boolean` | `addBinding(UpperIdentifier u, LowerIdentifier l, java.util.Map<java.lang.String,java.lang.Object> options)`
`void` | `addPendingMessage(UpperIdentifier i, org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle ret)`
`boolean` | `destinationChanged(UpperIdentifier oldDest, UpperIdentifier newDest, LowerIdentifier i, java.util.Map<java.lang.String,java.lang.Object> options)` Put this in lower.
`protected UpperIdentifier` | `getIntendedDest(java.util.Map<java.lang.String,java.lang.Object> options)`
`LowerIdentity<LowerIdentifier,java.nio.ByteBuffer>` | `getLowerIdentity()`
`UpperIdentity<UpperIdentifier,UpperMsgType>` | `getUpperIdentity()`
`void` | `initLowerLayer(TransportLayer<LowerIdentifier,java.nio.ByteBuffer> tl, ErrorHandler<LowerIdentifier> handler)`
`void` | `initUpperLayer(UpperIdentifier localIdentifier, TransportLayer<MiddleIdentifier,UpperMsgType> tl, LivenessProvider<MiddleIdentifier> live, ProximityProvider<MiddleIdentifier> prox, OverrideLiveness<LowerIdentifier> overrideLiveness)`
`void` | `printMemStats(int logLevel)`
`void` | `removePendingMessage(UpperIdentifier i, org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle ret)`
`void` | `setDeadForever(LowerIdentifier l, UpperIdentifier i, java.util.Map<java.lang.String,java.lang.Object> options)` Put this in lower.
`void` | `setOverrideLiveness(OverrideLiveness<LowerIdentifier> ol)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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,MiddleIdentifier,LowerIdentifier> serializer

### nodeChangeStrategy

    protected NodeChangeStrategy<UpperIdentifier> nodeChangeStrategy

### sanityChecker

    protected SanityChecker<UpperIdentifier,MiddleIdentifier> sanityChecker

### bindings

    protected java.util.Map<MiddleIdentifier,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 expire them right away. Note, that it's possible to have the UpperIdentifier in multiple places if it has multiple paths (such as source routing)

### 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_FROM_INDEX

    public static final java.lang.String NODE_HANDLE_FROM_INDEX

See Also:
  Constant Field Values

### DONT_VERIFY

    public static final java.lang.String DONT_VERIFY

See Also:
  Constant Field Values

Constructor Detail

### IdentityImpl

    public IdentityImpl(byte[] localIdentifier,
                        IdentitySerializer<UpperIdentifier,MiddleIdentifier,LowerIdentifier> serializer,
                        NodeChangeStrategy<UpperIdentifier> nodeChangeStrategy,
                        SanityChecker<UpperIdentifier,MiddleIdentifier> sanityChecker,
                        Environment environment)

Method Detail

### addPendingMessage

    public void addPendingMessage(UpperIdentifier i,
                                  org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle ret)

### removePendingMessage

    public void removePendingMessage(UpperIdentifier i,
                                     org.mpisws.p2p.transport.identity.IdentityImpl.IdentityMessageHandle ret)

### printMemStats

    public void printMemStats(int logLevel)

### setOverrideLiveness

    public void setOverrideLiveness(OverrideLiveness<LowerIdentifier> ol)

### setDeadForever

    public void setDeadForever(LowerIdentifier l,
                               UpperIdentifier i,
                               java.util.Map<java.lang.String,java.lang.Object> options)

  Put this in lower.

  Parameters:
    `l` -
    `i` -
    `options` -

### getIntendedDest

    protected UpperIdentifier getIntendedDest(java.util.Map<java.lang.String,java.lang.Object> options)

### addBinding

    protected boolean addBinding(UpperIdentifier u,
                                 LowerIdentifier l,
                                 java.util.Map<java.lang.String,java.lang.Object> options)

  Parameters:
    `u` -
    `l` - is optional, and is set when the lower-layer calls it
    `options` -
  Returns:
    false if the new binding is actually old (IE, don't upgrade it)

### destinationChanged

    public boolean destinationChanged(UpperIdentifier oldDest,
                                      UpperIdentifier newDest,
                                      LowerIdentifier i,
                                      java.util.Map<java.lang.String,java.lang.Object> options)

  Put this in lower. Return true if the new one is a valid replacement of the old True if they are the same

  Parameters:
    `oldDest` -
    `newDest` -
    `i` -
  Returns:

### initLowerLayer

    public void initLowerLayer(TransportLayer<LowerIdentifier,java.nio.ByteBuffer> tl,
                               ErrorHandler<LowerIdentifier> handler)

### getLowerIdentity

    public LowerIdentity<LowerIdentifier,java.nio.ByteBuffer> getLowerIdentity()

### getUpperIdentity

    public UpperIdentity<UpperIdentifier,UpperMsgType> getUpperIdentity()

### initUpperLayer

    public void initUpperLayer(UpperIdentifier localIdentifier,
                               TransportLayer<MiddleIdentifier,UpperMsgType> tl,
                               LivenessProvider<MiddleIdentifier> live,
                               ProximityProvider<MiddleIdentifier> prox,
                               OverrideLiveness<LowerIdentifier> overrideLiveness)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.