jist.swans.route
Class RouteZrpZdp.LinkEntry

java.lang.Object
  extended by jist.swans.route.RouteZrpZdp.LinkEntry
Enclosing class:
RouteZrpZdp

private static class RouteZrpZdp.LinkEntry
extends java.lang.Object

ZDP link entry.


Field Summary
static RouteZrpZdp.LinkEntry[] EMPTY_ARRAY
          Empty link entry array.
static byte FLAG_DROP
          drop flag mask.
static byte FLAG_FLUSH
          flush flag mask.
static byte FLAG_FRESH
          fresh flag mask.
private  byte flags
          flush, link failure and freshness bits.
private  short id
          link sequence identifier.
private  Link link
          source-destination pair.
 
Constructor Summary
RouteZrpZdp.LinkEntry(Link link, short id, boolean drop)
          Create new link entry.
 
Method Summary
 boolean isDrop()
          Whether drop flag is set.
 boolean isFlush()
          Whether flush flag is set.
 boolean isFresh()
          Whether link entry has been processed.
 void processed()
          Clears information freshness indicator.
 void set(short id, boolean drop)
          Set link entry information.
private  void setDrop(boolean value)
          Set drop flag.
private  void setFlush(boolean value)
          Set flush flag.
private  void setFresh(boolean value)
          Set freshness flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final RouteZrpZdp.LinkEntry[] EMPTY_ARRAY
Empty link entry array.


FLAG_DROP

public static final byte FLAG_DROP
drop flag mask.

See Also:
Constant Field Values

FLAG_FRESH

public static final byte FLAG_FRESH
fresh flag mask.

See Also:
Constant Field Values

FLAG_FLUSH

public static final byte FLAG_FLUSH
flush flag mask.

See Also:
Constant Field Values

link

private final Link link
source-destination pair.


id

private short id
link sequence identifier.


flags

private byte flags
flush, link failure and freshness bits.

Constructor Detail

RouteZrpZdp.LinkEntry

public RouteZrpZdp.LinkEntry(Link link,
                             short id,
                             boolean drop)
Create new link entry.

Parameters:
link - source-destination pair
id - link sequence identifier
drop - link failure indicator
Method Detail

set

public void set(short id,
                boolean drop)
Set link entry information. Sets freshness on.

Parameters:
id - link sequence identifier
drop - link failure indicator

isFresh

public boolean isFresh()
Whether link entry has been processed.

Returns:
whether link entry has been processed

setFresh

private void setFresh(boolean value)
Set freshness flag.

Parameters:
value - whether to set or clear freshness flag

processed

public void processed()
Clears information freshness indicator.


isDrop

public boolean isDrop()
Whether drop flag is set.

Returns:
whether drop flag is set

setDrop

private void setDrop(boolean value)
Set drop flag.

Parameters:
value - whether to set or clear drop flag

isFlush

public boolean isFlush()
Whether flush flag is set.

Returns:
whether flush flag is set

setFlush

private void setFlush(boolean value)
Set flush flag.

Parameters:
value - whether to set or clear flush flag