bamboo.dht
Class GatewayClient
java.lang.Object
bamboo.util.StandardStage
bamboo.dht.GatewayClient
- All Implemented Interfaces:
- EventHandlerIF, SingleThreadedEventHandlerIF
public class GatewayClient
- extends StandardStage
An event-driven gateway client.
- Version:
- $Id: GatewayClient.java,v 1.11 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, 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 |
KEY_LEN
protected static final int KEY_LEN
- See Also:
- Constant Field Values
channel
protected SocketChannel channel
read_buf
protected ByteBuffer read_buf
write_buf
protected ByteBuffer write_buf
waiting
protected LinkedList<QueueElementIF> waiting
inflight
protected Map<Integer,GatewayClient.Request> inflight
next_xact_id
protected int next_xact_id
ib
protected NioMultiplePacketInputBuffer ib
next_read_size
protected int next_read_size
gateway
protected InetSocketAddress gateway
skey
protected SelectionKey skey
gway_inst
protected Gateway gway_inst
simulator
protected Simulator simulator
gnid
protected ostore.util.NodeId gnid
bbuf
protected static ByteBuffer bbuf
gateways
protected LinkedList<ostore.util.NodeId> gateways
last_gw
protected ostore.util.NodeId last_gw
try_next_gateway_cb
protected Runnable try_next_gateway_cb
GatewayClient
public GatewayClient()
get
public void get(bamboo_get_args get_args,
GatewayClient.GetDoneCb cb,
Object user_data)
get
public void get(bamboo_get_args get_args,
Curry.Thunk1<bamboo_get_res> thunk)
put
public void put(bamboo_put_args put_args,
GatewayClient.PutDoneCb cb,
Object user_data)
put
public void put(bamboo_put_args put_args,
Curry.Thunk1<Integer> thunk)
put_done
public void put_done(int xact_id,
int result)
get_done
public void get_done(int xact_id,
bamboo_get_res res)
application_enqueue
protected void application_enqueue(SinkIF sink,
QueueElementIF item)
init
public void init(ConfigDataIF config)
throws Exception
- Specified by:
init in interface EventHandlerIF- Overrides:
init in class StandardStage
- Throws:
Exception
try_next_gateway
protected void try_next_gateway()
handleEvent
public void handleEvent(QueueElementIF item)
- Specified by:
handleEvent in interface EventHandlerIF- Overrides:
handleEvent in class StandardStage