C# Class Brunet.Node

Inheritance: IDataHandler, ISender, IActionQueue, ITAHandler
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Méthodes publiques

Свойство Type Description
DemuxHandler DemuxHandler
EdgeVerifyMethod EdgeVerifier
MAX_AVG_QUEUE_LENGTH int
PACKET_QUEUE_RETAIN float
SimulatorRandom Random
_disconnect_on_overload bool

Protected Properties

Свойство Type Description
MAX_CONNECTION_TIMEOUT TimeSpan
MAX_QUEUE_LENGTH int
_LOG bool
_MAX_RECORDED_TAS int
_announce_thread Thread
_check_edges Util.FuzzyEvent
_co_list List
_codeinjection Brunet.Services.CodeInjection
_con_state ConnectionState
_connection_table ConnectionTable
_connection_timeout TimeSpan
_current_action IAction
_edge_factory EdgeFactory
_edgelistener_list ArrayList
_heart_period int
_heartbeat_handlers Brunet.Util.FuzzyEvent>.Dictionary
_local_add Address
_monitor_fe Util.FuzzyEvent
_mr_handler Brunet.Services.MapReduce.MapReduceHandler
_packet_queue Brunet.Concurrent.LFBlockingQueue
_packet_queue_exp_avg float
_realm string
_remote_ta ImmutableList
_rpc RpcManager
_rrm ReqrepManager
_running int
_send_pings int
_sync object
_ta_discovery ImmutableList
_task_queue NodeTaskQueue
_unconnected_timeout TimeSpan

Méthodes publiques

Méthode Description
Abort ( ) : void
AddConnectionOverlord ( ConnectionOverlord co ) : void
AddEdgeListener ( EdgeListener el ) : void
AddTADiscovery ( Discovery disc ) : void

Add a TA discovery agent.

Clear ( ) : void

Deletes (and thus unsubscribes) all IDataHandlers for the table.

ClearTypeSource ( Object t ) : void

Deletes (and thus unsubscribes) all IDataHandlers for a given key.

Connect ( ) : void
ConnectionHandler ( object ct, EventArgs args ) : void
CreateLocalSender ( object n, string uri ) : Node
Disconnect ( ) : void
EnqueueAction ( IAction a ) : void
GetNodeInfo ( int max_local ) : NodeInfo
GetNodeInfo ( int max_local, TAAuthorizer ta_auth ) : NodeInfo
GetStatus ( string con_type_string, Brunet.Address addr ) : StatusMessage
GetTypeSource ( Object t ) : ISource

All packets that come to this are demultiplexed according to t. To subscribe or unsubscribe, get the ISource for the type you want and subscribe to it,

HandleData ( MemBlock data, ISender return_path, object state ) : void
Send ( ICopyable data ) : void
ToString ( ) : string
ToUri ( ) : string
UpdateRemoteTAs ( IList tas_to_add ) : void

Méthodes protégées

Méthode Description
Announce ( MemBlock b, ISender from ) : void
AnnounceThread ( ) : void
CheckEdgesCallback ( object node, EventArgs args ) : void
CheckForStateChange ( object ct, EventArgs ce_args ) : void
Close ( Edge e ) : void
ComputeDynamicTimeout ( ) : System.TimeSpan
EdgeHandler ( object edge, EventArgs args ) : void
HandleTADiscoveryState ( Node n, ConnectionState newstate ) : void

If the node is connecting, we need TAs, if its in any other state, we'll deal with what we have.

LogPacketQueue ( ) : void
MonitorLogOff ( ) : void
MonitorLogSwitch ( ) : void
Node ( Address addr ) : System
Node ( Address addr, string realm ) : System
SendStateChange ( ConnectionState new_state ) : void
SetConState ( ConnectionState new_cs, bool &success ) : ConnectionState
StartAllEdgeListeners ( ) : void
StartConnectionOverlords ( ) : void
StopAllEdgeListeners ( ) : void
StopConnectionOverlords ( ) : void

Private Methods

Méthode Description
Node ( ) : System

Method Details

Abort() public abstract méthode

public abstract Abort ( ) : void
Résultat void

AddConnectionOverlord() public méthode

public AddConnectionOverlord ( ConnectionOverlord co ) : void
co ConnectionOverlord
Résultat void

AddEdgeListener() public méthode

public AddEdgeListener ( EdgeListener el ) : void
el EdgeListener
Résultat void

AddTADiscovery() public méthode

Add a TA discovery agent.
public AddTADiscovery ( Discovery disc ) : void
disc Brunet.Transport.Discovery
Résultat void

Announce() protected méthode

protected Announce ( MemBlock b, ISender from ) : void
b MemBlock
from ISender
Résultat void

AnnounceThread() protected méthode

protected AnnounceThread ( ) : void
Résultat void

CheckEdgesCallback() protected méthode

protected CheckEdgesCallback ( object node, EventArgs args ) : void
node object
args System.EventArgs
Résultat void

CheckForStateChange() protected méthode

protected CheckForStateChange ( object ct, EventArgs ce_args ) : void
ct object
ce_args System.EventArgs
Résultat void

Clear() public méthode

Deletes (and thus unsubscribes) all IDataHandlers for the table.
public Clear ( ) : void
Résultat void

ClearTypeSource() public méthode

Deletes (and thus unsubscribes) all IDataHandlers for a given key.
public ClearTypeSource ( Object t ) : void
t Object The key for the MultiSource.
Résultat void

Close() protected méthode

protected Close ( Edge e ) : void
e Edge
Résultat void

ComputeDynamicTimeout() protected méthode

protected ComputeDynamicTimeout ( ) : System.TimeSpan
Résultat System.TimeSpan

Connect() public méthode

public Connect ( ) : void
Résultat void

ConnectionHandler() public méthode

public ConnectionHandler ( object ct, EventArgs args ) : void
ct object
args System.EventArgs
Résultat void

CreateLocalSender() public static méthode

public static CreateLocalSender ( object n, string uri ) : Node
n object
uri string
Résultat Node

Disconnect() public méthode

public Disconnect ( ) : void
Résultat void

EdgeHandler() protected méthode

protected EdgeHandler ( object edge, EventArgs args ) : void
edge object
args System.EventArgs
Résultat void

EnqueueAction() public méthode

public EnqueueAction ( IAction a ) : void
a IAction
Résultat void

GetNodeInfo() public méthode

public GetNodeInfo ( int max_local ) : NodeInfo
max_local int
Résultat NodeInfo

GetNodeInfo() public méthode

public GetNodeInfo ( int max_local, TAAuthorizer ta_auth ) : NodeInfo
max_local int
ta_auth TAAuthorizer
Résultat NodeInfo

GetStatus() public méthode

public GetStatus ( string con_type_string, Brunet.Address addr ) : StatusMessage
con_type_string string
addr Brunet.Address
Résultat Brunet.Connections.StatusMessage

GetTypeSource() public méthode

All packets that come to this are demultiplexed according to t. To subscribe or unsubscribe, get the ISource for the type you want and subscribe to it,
public GetTypeSource ( Object t ) : ISource
t Object The key for the MultiSource.
Résultat ISource

HandleData() public méthode

public HandleData ( MemBlock data, ISender return_path, object state ) : void
data MemBlock
return_path ISender
state object
Résultat void

HandleTADiscoveryState() protected méthode

If the node is connecting, we need TAs, if its in any other state, we'll deal with what we have.
protected HandleTADiscoveryState ( Node n, ConnectionState newstate ) : void
n Node
newstate Brunet.Connections.ConnectionState
Résultat void

LogPacketQueue() protected méthode

protected LogPacketQueue ( ) : void
Résultat void

MonitorLogOff() protected méthode

protected MonitorLogOff ( ) : void
Résultat void

MonitorLogSwitch() protected méthode

protected MonitorLogSwitch ( ) : void
Résultat void

Node() protected méthode

protected Node ( Address addr ) : System
addr Address
Résultat System

Node() protected méthode

protected Node ( Address addr, string realm ) : System
addr Address
realm string
Résultat System

Send() public méthode

public Send ( ICopyable data ) : void
data ICopyable
Résultat void

SendStateChange() protected méthode

protected SendStateChange ( ConnectionState new_state ) : void
new_state ConnectionState
Résultat void

SetConState() protected méthode

protected SetConState ( ConnectionState new_cs, bool &success ) : ConnectionState
new_cs ConnectionState
success bool
Résultat ConnectionState

StartAllEdgeListeners() protected méthode

protected StartAllEdgeListeners ( ) : void
Résultat void

StartConnectionOverlords() protected méthode

protected StartConnectionOverlords ( ) : void
Résultat void

StopAllEdgeListeners() protected méthode

protected StopAllEdgeListeners ( ) : void
Résultat void

StopConnectionOverlords() protected méthode

protected StopConnectionOverlords ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

ToUri() public méthode

public ToUri ( ) : string
Résultat string

UpdateRemoteTAs() public méthode

public UpdateRemoteTAs ( IList tas_to_add ) : void
tas_to_add IList
Résultat void

Property Details

DemuxHandler public_oe property

Handles subscriptions for the different types of packets that come to this node.
public DemuxHandler DemuxHandler
Résultat DemuxHandler

EdgeVerifyMethod public_oe property

public EdgeVerifier EdgeVerifyMethod
Résultat EdgeVerifier

MAX_AVG_QUEUE_LENGTH public_oe static_oe property

public static int MAX_AVG_QUEUE_LENGTH
Résultat int

MAX_CONNECTION_TIMEOUT protected_oe static_oe property

protected static TimeSpan MAX_CONNECTION_TIMEOUT
Résultat TimeSpan

MAX_QUEUE_LENGTH protected_oe static_oe property

protected static int MAX_QUEUE_LENGTH
Résultat int

PACKET_QUEUE_RETAIN public_oe static_oe property

public static float PACKET_QUEUE_RETAIN
Résultat float

SimulatorRandom public_oe static_oe property

public static Random SimulatorRandom
Résultat Random

_LOG protected_oe property

protected bool _LOG
Résultat bool

_MAX_RECORDED_TAS static_oe protected_oe property

static protected int _MAX_RECORDED_TAS
Résultat int

_announce_thread protected_oe property

protected Thread _announce_thread
Résultat Thread

_check_edges protected_oe property

protected Util.FuzzyEvent _check_edges
Résultat Util.FuzzyEvent

_co_list protected_oe property

protected List _co_list
Résultat List

_codeinjection protected_oe property

protected Brunet.Services.CodeInjection _codeinjection
Résultat Brunet.Services.CodeInjection

_con_state protected_oe property

protected ConnectionState _con_state
Résultat ConnectionState

_connection_table protected_oe property

protected ConnectionTable _connection_table
Résultat ConnectionTable

_connection_timeout protected_oe property

protected TimeSpan _connection_timeout
Résultat TimeSpan

_current_action protected_oe property

protected IAction _current_action
Résultat IAction

_disconnect_on_overload public_oe property

public bool _disconnect_on_overload
Résultat bool

_edge_factory protected_oe property

protected EdgeFactory _edge_factory
Résultat EdgeFactory

_edgelistener_list protected_oe property

protected ArrayList _edgelistener_list
Résultat ArrayList

_heart_period protected_oe property

protected int _heart_period
Résultat int

_heartbeat_handlers protected_oe property

protected Dictionary _heartbeat_handlers
Résultat Brunet.Util.FuzzyEvent>.Dictionary

_local_add protected_oe property

protected Address _local_add
Résultat Address

_monitor_fe protected_oe property

protected Util.FuzzyEvent _monitor_fe
Résultat Util.FuzzyEvent

_mr_handler protected_oe property

protected MapReduceHandler,Brunet.Services.MapReduce _mr_handler
Résultat Brunet.Services.MapReduce.MapReduceHandler

_packet_queue protected_oe property

protected LFBlockingQueue,Brunet.Concurrent _packet_queue
Résultat Brunet.Concurrent.LFBlockingQueue

_packet_queue_exp_avg protected_oe property

protected float _packet_queue_exp_avg
Résultat float

_realm protected_oe property

protected string _realm
Résultat string

_remote_ta protected_oe property

protected ImmutableList _remote_ta
Résultat ImmutableList

_rpc protected_oe property

protected RpcManager _rpc
Résultat RpcManager

_rrm protected_oe property

protected ReqrepManager _rrm
Résultat ReqrepManager

_running protected_oe property

protected int _running
Résultat int

_send_pings protected_oe property

protected int _send_pings
Résultat int

_sync protected_oe property

protected object _sync
Résultat object

_ta_discovery protected_oe property

protected ImmutableList _ta_discovery
Résultat ImmutableList

_task_queue protected_oe property

protected NodeTaskQueue _task_queue
Résultat NodeTaskQueue

_unconnected_timeout protected_oe static_oe property

protected static TimeSpan _unconnected_timeout
Résultat TimeSpan