import AbstractNetwork from 'foglet-core/src/network/abstract/abstract-network.js'
AbstractNetwork
Extends:
AbstractNetwork represents an abstract network layer
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructor |
Member Summary
Public Members | ||
public get |
Return a unique identifier of the peer |
|
public get |
The in-view ID of the peer in the network |
|
public get |
The out-view ID of the peer in the network |
|
public get |
rps: *: * The Random Peer Sampling Network itself |
Private Members | ||
private |
_id: * |
|
private |
_options: * |
|
private |
_rps: * |
Method Summary
Public Methods | ||
public |
getNeighbours(limit: integer): string[] Get the IDs of all available neighbours |
Private Methods | ||
private |
Build the RPS for this network. |
Public Constructors
Public Members
public get rps: *: * source
The Random Peer Sampling Network itself
Return:
* | The Random Peer Sampling Network |
Private Members
private _id: * source
private _options: * source
private _rps: * source
Public Methods
public getNeighbours(limit: integer): string[] source
Get the IDs of all available neighbours
Params:
Name | Type | Attribute | Description |
limit | integer | Max number of neighbours to look for |
Private Methods
private _buildRPS(options: Object): * source
Build the RPS for this network. Subclasses of AbstractNetwork must implement this method.
Params:
Name | Type | Attribute | Description |
options | Object | Options used to build the RPS |
Return:
* | The network used as RPS/overlay |