C# Class Brunet.Services.Dht.Entry

An entry contains the data for a key:value pair such as the key, value, create time, and end time. The data is stored in a hashtable, which allows this to be casted to and from a hash table.
Mostrar archivo Open project: pstjuste/brunet Class Usage Examples

Protected Properties

Property Type Description
_ht System.Collections.Hashtable

Public Methods

Method Description
Entry ( Hashtable ht ) : System

Uses the hashtable as the data store for the dht

Entry ( MemBlock key, MemBlock data, System.DateTime create_time, System.DateTime end_time ) : System

Creates a new Entry given the key, data, create time, and end time

Equals ( Object ent ) : bool

Compares the hashcodes for two Entrys.

GetHashCode ( ) : int

Gets the hashcode for an Entry object computed by the Key.GetHashCode() xor Value.GetHashCode().

Method Details

Entry() public method

Uses the hashtable as the data store for the dht
public Entry ( Hashtable ht ) : System
ht System.Collections.Hashtable A hashtable containing key, value, create_time, and end_time strings as keys
return System

Entry() public method

Creates a new Entry given the key, data, create time, and end time
public Entry ( MemBlock key, MemBlock data, System.DateTime create_time, System.DateTime end_time ) : System
key Brunet.Util.MemBlock The dht key used for indexing this data.
data Brunet.Util.MemBlock A single value stored at this key.
create_time System.DateTime The initial creation time for this key:value pair.
end_time System.DateTime The time the lease expires for this key:value pair.
return System

Equals() public method

Compares the hashcodes for two Entrys.
public Equals ( Object ent ) : bool
ent Object
return bool

GetHashCode() public method

Gets the hashcode for an Entry object computed by the Key.GetHashCode() xor Value.GetHashCode().
public GetHashCode ( ) : int
return int

Property Details

_ht protected_oe property

The hashtable where Entry data is stored.
protected Hashtable,System.Collections _ht
return System.Collections.Hashtable