flowsim.slatr
Class SLATRouter
java.lang.Object
|
+--flowsim.slatr.SLATRouter
- Direct Known Subclasses:
- SLATRouterImpl
- public abstract class SLATRouter
- extends java.lang.Object
- implements Router, SLABuyer, SLASeller, FlowMonitor, NodeMonitor
Method Summary |
protected void |
accept_bid(SLA bid)
|
void |
add_buyer(SLABuyer buyer,
SLABuyerProfile profile)
|
void |
add_to_budget(long gain)
|
protected abstract void |
bid_received(SLA bid)
|
protected abstract void |
confirm_received(SLA sla)
|
protected void |
confirm_sent(Service to,
SLA sla)
|
void |
debug_table()
|
void |
debug_table(java.io.PrintStream ps)
|
protected void |
expire_taken(SLA taken,
boolean isbid)
|
void |
flow_blocked(Flow _flow)
|
void |
flow_changed_available_bw(Flow f,
int was_bw)
|
void |
flow_changed_bw(Flow f,
int was_bw)
|
void |
flow_changed_desired_bw(Flow f,
int was_bw)
|
void |
flow_started(Flow _flow)
|
void |
flow_stopped(Flow _flow)
|
Node |
get_node()
|
protected int |
get_peer(Node node,
int port)
|
protected int |
get_peer(Service service)
|
int |
get_port()
|
SLABuyerProfile |
get_profile()
|
void |
iface_changed(Node n,
int i)
|
void |
receive_accept(SLATP_Accept msg)
|
void |
receive_ask(SLATP_Ask ask)
|
void |
receive_bid(SLATP_Bid msg)
|
void |
receive_confirm(SLATP_Confirm msg)
|
void |
receive_reject(SLATP_Reject msg)
|
protected abstract void |
reject_received(SLA sla)
|
protected void |
reject_sent(Service to,
SLA sla)
|
protected void |
release_link_for_sla(SLA sla)
|
void |
remove_from_budget(long cost)
|
protected void |
remove_given_bid(SLA given_bid,
com.sun.java.util.collections.Iterator it)
|
protected void |
remove_given_sla(SLA given_sla,
com.sun.java.util.collections.Iterator it)
|
protected void |
remove_taken_bid(SLA bid,
com.sun.java.util.collections.Iterator it)
|
protected void |
remove_taken_sla(SLA sla,
com.sun.java.util.collections.Iterator it)
|
protected boolean |
reserve_link_for_sla(SLA sla)
|
void |
route(Flow _flow)
|
protected void |
send_accept(SLASeller to,
Node dest,
int ds)
|
protected void |
send_ask(SLASeller to,
Node dest,
int bw,
int max_delay,
long exp)
|
protected void |
send_bid(SLABuyer to,
SLA sla,
SLA bid)
|
abstract boolean |
send_confirm_for_accept(SLA sla)
|
protected void |
send_confirm(SLABuyer to,
SLA given)
|
protected void |
send_reject(SLABuyer to,
Node dest,
int ds)
|
void |
start()
|
protected void |
taken_bw_changed(SLA taken)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
GIVENSLA_EXPIRATION_MARGIN
protected static final long GIVENSLA_EXPIRATION_MARGIN
s
protected Simulator s
node
protected Node node
port
protected int port
sla_map
protected SLAMap sla_map
ds_numbers
protected DSNumbers ds_numbers
links_rbw
protected int[] links_rbw
peer_iface
protected int[] peer_iface
peer_service
protected Service[] peer_service
peer_number
protected com.sun.java.util.collections.Map peer_number
next_peer_nr
protected int next_peer_nr
buyer_profile
protected SLABuyerProfile[] buyer_profile
routed_flows
protected com.sun.java.util.collections.Collection routed_flows
peers
protected final int peers
ifaces
protected final int ifaces
SLATRouter
public SLATRouter(Simulator s,
Node node,
int port,
int local_peers,
long budget,
long fixed_costs)
get_node
public final Node get_node()
get_port
public final int get_port()
remove_from_budget
public final void remove_from_budget(long cost)
add_to_budget
public final void add_to_budget(long gain)
expire_taken
protected void expire_taken(SLA taken,
boolean isbid)
get_peer
protected final int get_peer(Service service)
get_peer
protected final int get_peer(Node node,
int port)
remove_taken_sla
protected void remove_taken_sla(SLA sla,
com.sun.java.util.collections.Iterator it)
remove_taken_bid
protected void remove_taken_bid(SLA bid,
com.sun.java.util.collections.Iterator it)
remove_given_sla
protected void remove_given_sla(SLA given_sla,
com.sun.java.util.collections.Iterator it)
remove_given_bid
protected void remove_given_bid(SLA given_bid,
com.sun.java.util.collections.Iterator it)
send_ask
protected void send_ask(SLASeller to,
Node dest,
int bw,
int max_delay,
long exp)
send_bid
protected void send_bid(SLABuyer to,
SLA sla,
SLA bid)
accept_bid
protected void accept_bid(SLA bid)
send_accept
protected void send_accept(SLASeller to,
Node dest,
int ds)
taken_bw_changed
protected void taken_bw_changed(SLA taken)
send_confirm
protected void send_confirm(SLABuyer to,
SLA given)
send_reject
protected void send_reject(SLABuyer to,
Node dest,
int ds)
get_profile
public SLABuyerProfile get_profile()
- Specified by:
- get_profile in interface SLABuyer
bid_received
protected abstract void bid_received(SLA bid)
receive_bid
public final void receive_bid(SLATP_Bid msg)
- Specified by:
- receive_bid in interface SLABuyer
confirm_received
protected abstract void confirm_received(SLA sla)
receive_confirm
public void receive_confirm(SLATP_Confirm msg)
- Specified by:
- receive_confirm in interface SLABuyer
reject_received
protected abstract void reject_received(SLA sla)
receive_reject
public void receive_reject(SLATP_Reject msg)
- Specified by:
- receive_reject in interface SLABuyer
add_buyer
public void add_buyer(SLABuyer buyer,
SLABuyerProfile profile)
- Specified by:
- add_buyer in interface SLASeller
receive_ask
public void receive_ask(SLATP_Ask ask)
- Specified by:
- receive_ask in interface SLASeller
send_confirm_for_accept
public abstract boolean send_confirm_for_accept(SLA sla)
confirm_sent
protected void confirm_sent(Service to,
SLA sla)
reject_sent
protected void reject_sent(Service to,
SLA sla)
receive_accept
public void receive_accept(SLATP_Accept msg)
- Specified by:
- receive_accept in interface SLASeller
reserve_link_for_sla
protected final boolean reserve_link_for_sla(SLA sla)
release_link_for_sla
protected final void release_link_for_sla(SLA sla)
flow_started
public void flow_started(Flow _flow)
- Specified by:
- flow_started in interface FlowMonitor
flow_stopped
public void flow_stopped(Flow _flow)
- Specified by:
- flow_stopped in interface FlowMonitor
flow_blocked
public void flow_blocked(Flow _flow)
- Specified by:
- flow_blocked in interface FlowMonitor
flow_changed_bw
public void flow_changed_bw(Flow f,
int was_bw)
- Specified by:
- flow_changed_bw in interface FlowMonitor
flow_changed_desired_bw
public void flow_changed_desired_bw(Flow f,
int was_bw)
- Specified by:
- flow_changed_desired_bw in interface FlowMonitor
flow_changed_available_bw
public void flow_changed_available_bw(Flow f,
int was_bw)
- Specified by:
- flow_changed_available_bw in interface FlowMonitor
route
public void route(Flow _flow)
- Specified by:
- route in interface Router
iface_changed
public void iface_changed(Node n,
int i)
- Specified by:
- iface_changed in interface NodeMonitor
start
public void start()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
debug_table
public void debug_table()
debug_table
public void debug_table(java.io.PrintStream ps)