bamboo.dht.fssim
Class ContinuousAlgorithm

java.lang.Object
  extended by bamboo.dht.fssim.Algorithm
      extended by bamboo.dht.fssim.ContinuousAlgorithm

public class ContinuousAlgorithm
extends Algorithm


Nested Class Summary
static class ContinuousAlgorithm.Params
           
 
Nested classes/interfaces inherited from class bamboo.dht.fssim.Algorithm
Algorithm.PutInfo, Algorithm.PutResultCb
 
Field Summary
protected  HashMap<Integer,Long> accumulated_penalties
           
protected  HashMap<Integer,Long> commitments_granted
           
protected static boolean DEBUG
           
protected static boolean FF_TO_SYS_TIME
           
protected  HashMap<Integer,Long> latest_finish_times
           
protected  ContinuousAlgorithm.Params params
           
protected static boolean PREEMPTIVE
           
protected  HashMap<Integer,Long> queue_size
           
protected  IonTree storage_tree
           
protected  long virtual_time
           
protected  long waiting_alarm
           
protected  long waiting_ft
           
protected  Algorithm.PutInfo waiting_put
           
 
Fields inherited from class bamboo.dht.fssim.Algorithm
client_count, instance, pending_puts, period, sim, stop_time, storage_by_client, total_puts
 
Constructor Summary
ContinuousAlgorithm(long st)
           
ContinuousAlgorithm(long st, ContinuousAlgorithm.Params par)
           
 
Method Summary
protected  void accept_put(Algorithm.PutInfo pi, long ft)
           
protected  void accept_waiting_put()
           
 boolean add_to_queue(Algorithm.PutInfo pi, boolean force)
           
 void enqueue_put(int c, int size, int ttl_sec, Algorithm.PutResultCb cb, Object user_data)
           
protected  void init(long st)
           
protected  long penalty(int client)
           
 void print_usage()
           
 void process_pending_puts(LinkedList puts)
           
 void process_queued_puts()
           
protected  long start_time(int client)
           
 
Methods inherited from class bamboo.dht.fssim.Algorithm
accept_put, all_puts_expired, remove_put, simulation_finished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

protected static final boolean DEBUG
See Also:
Constant Field Values

FF_TO_SYS_TIME

protected static final boolean FF_TO_SYS_TIME
See Also:
Constant Field Values

PREEMPTIVE

protected static final boolean PREEMPTIVE
See Also:
Constant Field Values

params

protected ContinuousAlgorithm.Params params

virtual_time

protected long virtual_time

accumulated_penalties

protected HashMap<Integer,Long> accumulated_penalties

latest_finish_times

protected HashMap<Integer,Long> latest_finish_times

commitments_granted

protected HashMap<Integer,Long> commitments_granted

storage_tree

protected IonTree storage_tree

waiting_put

protected Algorithm.PutInfo waiting_put

waiting_ft

protected long waiting_ft

waiting_alarm

protected long waiting_alarm

queue_size

protected HashMap<Integer,Long> queue_size
Constructor Detail

ContinuousAlgorithm

public ContinuousAlgorithm(long st)

ContinuousAlgorithm

public ContinuousAlgorithm(long st,
                           ContinuousAlgorithm.Params par)
Method Detail

start_time

protected long start_time(int client)

penalty

protected long penalty(int client)

print_usage

public void print_usage()
Overrides:
print_usage in class Algorithm

process_queued_puts

public void process_queued_puts()

accept_put

protected void accept_put(Algorithm.PutInfo pi,
                          long ft)

accept_waiting_put

protected void accept_waiting_put()

add_to_queue

public boolean add_to_queue(Algorithm.PutInfo pi,
                            boolean force)

enqueue_put

public void enqueue_put(int c,
                        int size,
                        int ttl_sec,
                        Algorithm.PutResultCb cb,
                        Object user_data)
Overrides:
enqueue_put in class Algorithm

init

protected void init(long st)

process_pending_puts

public void process_pending_puts(LinkedList puts)
Specified by:
process_pending_puts in class Algorithm