|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mpisws.p2p.transport.rendezvous.EphemeralDBImpl<Identifier,HighIdentifier>
public class EphemeralDBImpl<Identifier,HighIdentifier>
Field Summary | |
---|---|
protected java.util.Map<Identifier,java.lang.Long> |
ephemeralToTag
|
protected java.util.Map<HighIdentifier,java.lang.Long> |
highToTag
|
protected long |
nextTag
|
protected long |
STALE_PORT_TIME
Time where a NAT will have reset the port to a new forwarding in millis Default 2 hours |
protected java.util.Map<java.lang.Long,MutableTuple<Identifier,java.lang.Long>> |
tagToEphemeral
maps tag to ephemeral and timestamp |
Fields inherited from interface org.mpisws.p2p.transport.rendezvous.EphemeralDB |
---|
NO_TAG |
Constructor Summary | |
---|---|
EphemeralDBImpl(Environment env,
long stalePortTime)
|
Method Summary | |
---|---|
protected void |
clear(long tag)
|
Identifier |
getEphemeral(HighIdentifier high)
Get the valid Identifier for this highIdentifier |
Identifier |
getEphemeral(long tag,
Identifier i)
Return a current valid Identifier for the tag, otherwise, return the default identifier only a getter |
long |
getTagForEphemeral(Identifier addr)
Get the existing tag, or make a new one if needed |
void |
mapHighToTag(HighIdentifier high,
long tag)
Tell the DB that the high identifier points to this tag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long STALE_PORT_TIME
protected long nextTag
protected java.util.Map<HighIdentifier,java.lang.Long> highToTag
protected java.util.Map<Identifier,java.lang.Long> ephemeralToTag
protected java.util.Map<java.lang.Long,MutableTuple<Identifier,java.lang.Long>> tagToEphemeral
Constructor Detail |
---|
public EphemeralDBImpl(Environment env, long stalePortTime)
env
- stalePortTime
- how long until we should forget about the port bindingMethod Detail |
---|
public void mapHighToTag(HighIdentifier high, long tag)
mapHighToTag
in interface EphemeralDB<Identifier,HighIdentifier>
high
- tag
- public Identifier getEphemeral(HighIdentifier high)
EphemeralDB
getEphemeral
in interface EphemeralDB<Identifier,HighIdentifier>
public Identifier getEphemeral(long tag, Identifier i)
EphemeralDB
getEphemeral
in interface EphemeralDB<Identifier,HighIdentifier>
i
- the default identifier
public long getTagForEphemeral(Identifier addr)
EphemeralDB
getTagForEphemeral
in interface EphemeralDB<Identifier,HighIdentifier>
protected void clear(long tag)
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |