bamboo.dht
Class IonTree

java.lang.Object
  extended by bamboo.dht.IonTree

public class IonTree
extends Object


Nested Class Summary
protected static class IonTree.Node
           
 
Field Summary
protected  long capacity
           
protected  long now
           
protected  long rate
           
protected  IonTree.Node root
           
 
Constructor Summary
IonTree(long n, long r, long c)
           
 
Method Summary
 boolean accept_put(long ttl, long size)
           
protected static IonTree.Node add_put(IonTree.Node n, long now, long rate, long ttl, long size)
           
 boolean add_put(long ttl, long size)
           
protected static IonTree.Node balance(IonTree.Node n)
           
protected static IonTree.Node create_point(IonTree.Node n, long rate, long time)
           
protected static IonTree.Node increment_range(IonTree.Node n, long low, long high, long inc)
           
static void main(String[] args)
           
protected static String node_to_string(IonTree.Node n)
           
protected static String node_to_string(IonTree.Node n, String indent)
           
protected static IonTree.Node remove_range(IonTree.Node n, long low, long high)
           
protected static IonTree.Node rotate_left(IonTree.Node n)
           
protected static IonTree.Node rotate_right(IonTree.Node n)
           
protected static IonTree.Node shift_time(IonTree.Node n, long now, long rate, long then)
           
 void shift_time(long then)
           
 String toString()
           
protected static String values_to_string(IonTree.Node n)
           
protected static String values_to_string(IonTree.Node n, long offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

now

protected long now

rate

protected long rate

capacity

protected long capacity

root

protected IonTree.Node root
Constructor Detail

IonTree

public IonTree(long n,
               long r,
               long c)
Method Detail

values_to_string

protected static String values_to_string(IonTree.Node n,
                                         long offset)

values_to_string

protected static String values_to_string(IonTree.Node n)

node_to_string

protected static String node_to_string(IonTree.Node n)

node_to_string

protected static String node_to_string(IonTree.Node n,
                                       String indent)

rotate_right

protected static IonTree.Node rotate_right(IonTree.Node n)

rotate_left

protected static IonTree.Node rotate_left(IonTree.Node n)

balance

protected static IonTree.Node balance(IonTree.Node n)

create_point

protected static IonTree.Node create_point(IonTree.Node n,
                                           long rate,
                                           long time)

increment_range

protected static IonTree.Node increment_range(IonTree.Node n,
                                              long low,
                                              long high,
                                              long inc)

remove_range

protected static IonTree.Node remove_range(IonTree.Node n,
                                           long low,
                                           long high)

add_put

protected static IonTree.Node add_put(IonTree.Node n,
                                      long now,
                                      long rate,
                                      long ttl,
                                      long size)

shift_time

protected static IonTree.Node shift_time(IonTree.Node n,
                                         long now,
                                         long rate,
                                         long then)

shift_time

public void shift_time(long then)

accept_put

public boolean accept_put(long ttl,
                          long size)

add_put

public boolean add_put(long ttl,
                       long size)

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)