ants
Class RouteTable

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--ants.RouteTable

public class RouteTable
extends java.util.Hashtable
implements java.lang.Runnable

routing table

See Also:
Serialized Form

Field Summary
static int DELETEINTERVAL
           
static int GCINTERVAL
           
static int INFINITY
           
static boolean LOGGING
           
static int MAXROUTESPERUPDATE
           
 RouteEntry[] neighbor_list
           
 int node
           
static int TRIGGERINTERVAL
           
static int TRIGGERSPREAD
           
static int UPDATEINTERVAL
           
static int UPDATESPREAD
           
 
Constructor Summary
RouteTable(int n)
           
RouteTable(Node n)
           
 
Method Summary
 void clearChangeFlags()
           
 void clearDeleteTimer(RouteEntry r)
           
 void clearGCTimer(RouteEntry r)
           
 void clearTimer(RouteEvent r)
           
 void deleteEntries(RouteEvent e)
           
 RouteEvent findFirstTimer()
           
 RouteEvent findTimer(long when)
           
 void gcEntries(RouteEvent e)
           
 RouteEntry get(int key)
           
 java.util.Vector getEvents()
           
 java.util.Hashtable getGCPool()
           
 java.util.Hashtable getGWs()
           
 boolean getTrigger()
           
 boolean getUpdates()
           
static void main(java.lang.String[] args)
           
 RouteEntry put(int key, RouteEntry element)
           
 void read(java.lang.String file)
           
 RouteEntry remove(int key)
           
 void run()
           
 void sendRouteMessages(int cause)
           
 void sendRouteWorker(RouteEntry r, ChannelAddress addr, int cause)
           
 void sendUpdate(RouteEntry g, ChannelAddress addr, java.util.Vector r)
           
 void setDeleteTimer(RouteEntry r, long now)
           
 void setGCTimer(RouteEntry r, long now)
           
 void setPeriodicTimer(long now)
           
 RouteEvent setTimer(long when, int type)
           
 void setTriggerTimer(long now)
           
 void setUpdates(boolean dynamic)
           
 void start()
           
 boolean updateEntry(int dest, int dist, int gw, java.lang.String link, long now)
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETEINTERVAL

public static final int DELETEINTERVAL

GCINTERVAL

public static final int GCINTERVAL

UPDATEINTERVAL

public static final int UPDATEINTERVAL

UPDATESPREAD

public static final int UPDATESPREAD

TRIGGERINTERVAL

public static final int TRIGGERINTERVAL

TRIGGERSPREAD

public static final int TRIGGERSPREAD

MAXROUTESPERUPDATE

public static final int MAXROUTESPERUPDATE

INFINITY

public static final int INFINITY

LOGGING

public static final boolean LOGGING

node

public int node

neighbor_list

public RouteEntry[] neighbor_list
Constructor Detail

RouteTable

public RouteTable(int n)

RouteTable

public RouteTable(Node n)
Method Detail

setUpdates

public void setUpdates(boolean dynamic)

getUpdates

public boolean getUpdates()

getEvents

public java.util.Vector getEvents()

getTrigger

public boolean getTrigger()

getGCPool

public java.util.Hashtable getGCPool()

getGWs

public java.util.Hashtable getGWs()

put

public RouteEntry put(int key,
                      RouteEntry element)

get

public RouteEntry get(int key)

remove

public RouteEntry remove(int key)

read

public void read(java.lang.String file)
          throws java.lang.Exception

sendUpdate

public void sendUpdate(RouteEntry g,
                       ChannelAddress addr,
                       java.util.Vector r)

findTimer

public RouteEvent findTimer(long when)

findFirstTimer

public RouteEvent findFirstTimer()

setTimer

public RouteEvent setTimer(long when,
                           int type)

clearTimer

public void clearTimer(RouteEvent r)

setDeleteTimer

public void setDeleteTimer(RouteEntry r,
                           long now)

clearDeleteTimer

public void clearDeleteTimer(RouteEntry r)

setGCTimer

public void setGCTimer(RouteEntry r,
                       long now)

clearGCTimer

public void clearGCTimer(RouteEntry r)

setPeriodicTimer

public void setPeriodicTimer(long now)

setTriggerTimer

public void setTriggerTimer(long now)

updateEntry

public boolean updateEntry(int dest,
                           int dist,
                           int gw,
                           java.lang.String link,
                           long now)

deleteEntries

public void deleteEntries(RouteEvent e)

gcEntries

public void gcEntries(RouteEvent e)

clearChangeFlags

public void clearChangeFlags()

sendRouteWorker

public void sendRouteWorker(RouteEntry r,
                            ChannelAddress addr,
                            int cause)

sendRouteMessages

public void sendRouteMessages(int cause)

run

public void run()
Specified by:
run in interface java.lang.Runnable

start

public void start()
           throws java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception