bamboo.openhash.fileshare
Class FileShare
java.lang.Object
bamboo.util.StandardStage
bamboo.openhash.fileshare.FileShare
- All Implemented Interfaces:
- EventHandlerIF, SingleThreadedEventHandlerIF
public class FileShare
- extends StandardStage
A CFS-like file sharing program.
- Version:
- $Id: FileShare.java,v 1.5 2005/03/02 02:25:13 srhea Exp $
- Author:
- Sean C. Rhea
| Methods inherited from class bamboo.util.StandardStage |
BUG, BUG, BUG, config_get_boolean, config_get_double, config_get_int, config_get_string, configGetInt, destroy, dispatch, enqueue, handleEvent, handleEvents, lookup_stage, now_ms, timer_ms |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BRANCHING
protected static final int BRANCHING
- See Also:
- Constant Field Values
MAX_BUFFER
protected static final int MAX_BUFFER
- See Also:
- Constant Field Values
MAX_PARALLEL
protected static final int MAX_PARALLEL
- See Also:
- Constant Field Values
APPLICATION
protected static final String APPLICATION
- See Also:
- Constant Field Values
ttl
protected int ttl
md
protected MessageDigest md
client
protected GatewayClient client
is
protected FileInputStream is
os
protected FileOutputStream os
secret
protected byte[] secret
ready
protected LinkedList<Pair<byte[],ByteBuffer>> ready
wblocks
protected Vector<LinkedList<ByteBuffer>> wblocks
rblocks
protected Vector<PriorityQueue> rblocks
rnext
protected Vector<Long> rnext
outstanding
protected int outstanding
key
protected byte[] key
put_done_cb
public Curry.Thunk2<bamboo_put_args,Integer> put_done_cb
get_done_cb
public Curry.Thunk3<bamboo_get_args,Long,bamboo_get_res> get_done_cb
FileShare
public FileShare()
throws Exception
- Throws:
Exception
init
public void init(ConfigDataIF config)
throws Exception
- Specified by:
init in interface EventHandlerIF- Overrides:
init in class StandardStage
- Throws:
Exception
make_parents
public void make_parents(boolean done)
- Transfer wblocks from the wblocks array to the ready queue.
write
public void write()
read
public void read()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception