Home Reference Source
public class | source

EPV

Entry composing the partial view of a peer.

Constructor Summary

Public Constructor
public

constructor(peerId: string, descriptor: object)

Member Summary

Public Members
public
public get

count: *

Get the number of occurrences of this neighbor.

public
public get

Get the oldest age of this neighbor.

public

peer: *

Method Summary

Public Methods
public

add()

Add a new 'instance' of this neigbhor, i.e., add a new age entry.

public

Increment the ages

public

Remove the oldest entry of this neighbor.

public

Remove the youngest entry of this neigbhor.

public

update(descriptor: object)

Update the descriptor of the entry

Public Constructors

public constructor(peerId: string, descriptor: object) source

Params:

NameTypeAttributeDescription
peerId string

The identifier of the neighbor.

descriptor object
  • optional
  • default: {}

The descriptor of this neighbor.

Public Members

public ages: number[] source

public get count: * source

Get the number of occurrences of this neighbor.

public descriptor: * source

public get oldest: number: * source

Get the oldest age of this neighbor.

Return:

number

The oldest age.

public peer: * source

Public Methods

public add() source

Add a new 'instance' of this neigbhor, i.e., add a new age entry.

public increment() source

Increment the ages

public removeOldest(): boolean source

Remove the oldest entry of this neighbor.

Return:

boolean

True if the entry has no age anymore, false otherwise.

public removeYoungest(): boolean source

Remove the youngest entry of this neigbhor.

Return:

boolean

True if the entry has no age anymore, false otherwise.

public update(descriptor: object) source

Update the descriptor of the entry

Params:

NameTypeAttributeDescription
descriptor object

The new descriptor assigned to this neigbhor.