flowsim.slatr
Class SLATUser
java.lang.Object
|
+--flowsim.slatr.UserImpl
|
+--flowsim.slatr.SLATUser
- Direct Known Subclasses:
- SLATUserVoice
- public abstract class SLATUser
- extends UserImpl
- implements SLABuyer
User of services provided by a SLATRouter.
- See Also:
SLATRouter
Constructor Summary |
SLATUser(Simulator s,
Node node,
int port,
long budget,
long budget_incr,
int server_port)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
server
protected SLASeller server
SLATUser
public SLATUser(Simulator s,
Node node,
int port,
long budget,
long budget_incr,
int server_port)
- Parameters:
s
- simulator object.node
- node where the user resides.port
- port where the user resides.budget
- initial budget.budget_incr
- budget increase pro second.server_port
- port of (unique) SLASeller for this user.
get_profile
public SLABuyerProfile get_profile()
- Specified by:
- get_profile in interface SLABuyer
remove_sla
public void remove_sla(SLA sla)
remove_bid
public void remove_bid(SLA bid)
bid_received
public void bid_received(SLA bid)
receive_bid
public final void receive_bid(SLATP_Bid msg)
- Specified by:
- receive_bid in interface SLABuyer
confirm_received
public void confirm_received(SLA sla)
receive_confirm
public final void receive_confirm(SLATP_Confirm msg)
- Specified by:
- receive_confirm in interface SLABuyer
receive_reject
public final void receive_reject(SLATP_Reject msg)
- Specified by:
- receive_reject in interface SLABuyer
bid_utility
public abstract float bid_utility(SLA ideal,
SLA bid)
- definition:
bid_utility(ideal,ideal)=1, bid_utility(ideal,nothing)=0
utility_wtp
public abstract int utility_wtp(SLA sla)
- willingness to pay for maximal utility
send_ask
protected void send_ask(Node dest,
int bw,
int max_delay,
long expiration)
ask
protected void ask(SLA ideal)
buy
protected void buy(SLA ideal)
buy_best_bid
protected boolean buy_best_bid(SLA ideal)
toString
public java.lang.String toString()
- Overrides:
- toString in class UserImpl
print_stats
public void print_stats()
- Overrides:
- print_stats in class UserImpl