|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.network.MultiplexedNetwork
A stage that supports multiple virtual OceanStore nodes in a single JVM instance. A single instance of this stage can be used to provide network support for N virtual OceanStore nodes, in place of using N separtate ostore.network.Network stages to acheive the same goal. Lock Dependency Graph:
Nested Class Summary | |
---|---|
protected class |
MultiplexedNetwork.ConnectionState
All the state we need about a connection to another node. |
protected class |
MultiplexedNetwork.DelayWrapper
|
Field Summary | |
---|---|
protected PriorityQueue |
close_me
Connections which we want to close. |
protected Map |
conn_to_connstate
Maps ATcpConnection objects to ConnectionState objects; |
protected static boolean |
DEBUG
|
protected static boolean |
DEBUG_SERIALIZATION
|
protected Classifier |
delay_classifier
The Classifier for node_id_0, used to dispatch DelayWrappers to. |
protected LinkedList |
local_nodeids
A list of NodeIds within this JVM. |
protected NodeId |
lowest_nodeid
The NodeId for node_id_0, used to get Alarms on. |
protected PriorityQueue |
mystery_connections
Used to time out connections without IdentityMessages. |
protected Map |
node_id_to_vertex
For emulation of large networks. |
protected Map |
nodeid_to_classifier
Maps NodeIds to the Classifiers within this JVM. |
protected Map |
nodeid_to_connstate
Maps NodeId objects to the ConnectionState objects in whose ids_represented sets they reside. |
protected int |
open_connections
For debugging. |
protected Object |
open_connections_lock
|
protected String |
TAG
|
protected SinkIF |
this_sink
|
protected soss.network.TransitStub |
ts
For emulation of large networks. |
Constructor Summary | |
---|---|
MultiplexedNetwork()
|
Method Summary | |
---|---|
protected static void |
BUG(String msg)
For convenience. |
void |
destroy()
|
protected void |
enqueue_msg(ATcpConnection conn,
NetworkMessage msg)
|
protected void |
handle_alarm()
Generally, we don't want to close sinks immediately, as there may be data still on the wire; instead, we just put them in this close_me priority queue, and they will be closed sometime after the time equal to their priority has passed. |
protected void |
handle_atcp_connect_failed_event(ATcpConnectFailedEvent failure)
|
protected void |
handle_atcp_connection(ATcpConnection conn)
|
protected void |
handle_atcp_inpacket(ATcpInPacket packet)
|
protected void |
handle_closed_connection(ATcpConnection conn)
|
protected void |
handle_identity_msg(IdentityMessage ident,
MultiplexedNetwork.ConnectionState connstate,
ATcpConnection conn)
|
protected void |
handle_outbound_network_message(NetworkMessage msg,
boolean delay)
|
protected void |
handle_sink_closed_event(SinkClosedEvent sce)
|
void |
handleEvent(QueueElementIF item)
|
void |
handleEvents(QueueElementIF[] items)
|
void |
init(ConfigDataIF config)
Set things up. |
int |
profileSize()
Defined by ProfilableIF |
protected void |
read_topology_info(String topology_graph,
String topology_mapping)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String TAG
protected static final boolean DEBUG
protected static final boolean DEBUG_SERIALIZATION
protected Map nodeid_to_classifier
protected LinkedList local_nodeids
protected Classifier delay_classifier
protected NodeId lowest_nodeid
protected Map conn_to_connstate
protected Map nodeid_to_connstate
protected SinkIF this_sink
protected PriorityQueue mystery_connections
protected PriorityQueue close_me
protected Map node_id_to_vertex
protected soss.network.TransitStub ts
protected int open_connections
protected Object open_connections_lock
Constructor Detail |
public MultiplexedNetwork()
Method Detail |
public void init(ConfigDataIF config) throws Exception
init
in interface EventHandlerIF
Exception
public void handleEvent(QueueElementIF item) throws EventHandlerException
handleEvent
in interface EventHandlerIF
EventHandlerException
public void handleEvents(QueueElementIF[] items) throws EventHandlerException
handleEvents
in interface EventHandlerIF
EventHandlerException
public void destroy() throws Exception
destroy
in interface EventHandlerIF
Exception
protected void read_topology_info(String topology_graph, String topology_mapping) throws IOException
IOException
protected void handle_outbound_network_message(NetworkMessage msg, boolean delay)
protected void enqueue_msg(ATcpConnection conn, NetworkMessage msg)
protected void handle_atcp_connection(ATcpConnection conn)
protected void handle_atcp_inpacket(ATcpInPacket packet)
protected void handle_identity_msg(IdentityMessage ident, MultiplexedNetwork.ConnectionState connstate, ATcpConnection conn)
protected void handle_sink_closed_event(SinkClosedEvent sce)
protected void handle_closed_connection(ATcpConnection conn)
protected void handle_atcp_connect_failed_event(ATcpConnectFailedEvent failure)
public int profileSize()
profileSize
in interface ProfilableIF
protected static final void BUG(String msg)
protected void handle_alarm()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |