bamboo.dht
Class Gateway.MyConnState

java.lang.Object
  extended by bamboo.dht.Gateway.MyConnState
Enclosing class:
Gateway

protected class Gateway.MyConnState
extends Object


Field Summary
 InetAddress addr
           
 String client_string
           
protected  Curry.Thunk1<String> close_cb
           
protected  Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_get_req
           
protected  Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_null_req
           
protected  Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_put_req
           
protected  Gateway.ProcInfo[] handlers
           
protected  NioMultiplePacketInputBuffer ib
           
protected  long last_activity_ms
           
protected  int next_read_size
           
protected  Curry.Function4<Boolean,Integer,Integer,org.acplt.oncrpc.XdrAble,Runnable> normal_resp_cb
           
protected  Runnable read_cb
           
protected  int reqs_outstanding
           
 SocketChannel sc
           
protected  Runnable timeout_cb
           
 LinkedList<Curry.Function0<Boolean>> to_write
           
protected  Runnable write_cb
           
 
Constructor Summary
Gateway.MyConnState(SocketChannel sc)
           
 
Method Summary
protected  void conn_closed()
           
protected  Curry.Function0<Boolean> error_cb(int xact_id, int code, String m)
           
protected  void error_close_connection(String msg)
           
protected  Curry.Function0<Boolean> mismatch_cb(int xact_id)
           
protected  void rpc_get_done(Dht.GetReq req, Dht.GetResp resp, Integer xact_id, long start_ms, String client_lib, String application)
           
protected  void rpc_put_done(Dht.PutReq req, Dht.PutResp resp, Integer xact_id, long start_ms, byte[] value_hash, String client_lib, String application)
           
protected  void send_resp(Curry.Function0<Boolean> cb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sc

public SocketChannel sc

addr

public InetAddress addr

client_string

public String client_string

to_write

public LinkedList<Curry.Function0<Boolean>> to_write

ib

protected NioMultiplePacketInputBuffer ib

next_read_size

protected int next_read_size

last_activity_ms

protected long last_activity_ms

reqs_outstanding

protected int reqs_outstanding

timeout_cb

protected Runnable timeout_cb

read_cb

protected Runnable read_cb

write_cb

protected Runnable write_cb

close_cb

protected Curry.Thunk1<String> close_cb

normal_resp_cb

protected Curry.Function4<Boolean,Integer,Integer,org.acplt.oncrpc.XdrAble,Runnable> normal_resp_cb

handle_rpc_null_req

protected Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_null_req

handle_rpc_put_req

protected Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_put_req

handle_rpc_get_req

protected Curry.Thunk2<Integer,org.acplt.oncrpc.XdrAble> handle_rpc_get_req

handlers

protected Gateway.ProcInfo[] handlers
Constructor Detail

Gateway.MyConnState

public Gateway.MyConnState(SocketChannel sc)
Method Detail

error_cb

protected Curry.Function0<Boolean> error_cb(int xact_id,
                                            int code,
                                            String m)

mismatch_cb

protected Curry.Function0<Boolean> mismatch_cb(int xact_id)

send_resp

protected void send_resp(Curry.Function0<Boolean> cb)

rpc_put_done

protected void rpc_put_done(Dht.PutReq req,
                            Dht.PutResp resp,
                            Integer xact_id,
                            long start_ms,
                            byte[] value_hash,
                            String client_lib,
                            String application)

rpc_get_done

protected void rpc_get_done(Dht.GetReq req,
                            Dht.GetResp resp,
                            Integer xact_id,
                            long start_ms,
                            String client_lib,
                            String application)

conn_closed

protected void conn_closed()

error_close_connection

protected void error_close_connection(String msg)