|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Source
Field Summary | |
---|---|
string | baseUrl |
int |
DOWNLOAD_IDEAL_TIME_RANGE
Range to keep download times within (seconds) |
Naanou.ResourceExchange.Source.Manifest | FilledMarker |
int | generation |
Naanou.Common.Hash | id |
string[] | metaContacts |
int | metaMaxSimul |
string | metaName |
long | metaThrottle |
string | metaUser |
System.Threading.ManualResetEvent | mutex |
System.Threading.ReaderWriterLock | rwl |
int | simul |
int |
simulMax
The maximum simulatanous connections for this source |
Constructor Summary | |
---|---|
Source(Naanou.Common.Hash id, string baseUrl) Constructor. Do not use, instead use DownloadManager. |
Property Summary | |
---|---|
string |
BaseUrl
Gets the base url for the source e.g. http://localhost:80/direct/ |
string |
ContactEmail
Gets Email address |
string |
ContactIM
Gets Instant message address |
string[] |
Contacts
Gets contacts listed for server, if any. (e-mail, im, web ordering) |
string |
ContactWeb
Gets web contact address |
int |
Generation
Gets the generation (0...n) |
bool |
IsAcquirable
Gives a rough indication of whether a source is available (i.e. the simulatenous transfers on it are not exceeding limit) |
int |
MaximumSimul
Maximum number of simulataneous connections the source supports (advertised) |
int |
SimultaneousDownloads
Gets the number of simul downloads happening on source |
long |
Throttle
Gets the advertised throttling rate for this source |
string |
Title
Gets a string suitable for UI to give the source a name |
string |
User
Gets user id (serial) |
Method Summary | |
---|---|
void |
Acquire() Acquire source. If source is being overloaded by us, this call will block until its ready |
Naanou.ResourceExchange.Source.Manifest |
Create(string resource, string discoveryMethod) Create a manifest for a resource without any known bytes ranges |
Naanou.ResourceExchange.Source.Manifest |
Create(string resource, Naanou.ResourceExchange.ByteRange[] ranges, string discoveryMethod) Create a manifest for a resource, and known byte ranges |
void | DecrementGeneration() |
int | GetHashCode() |
void | IncrementGeneration() |
void |
LastDownloadSpeed(double bytesPerSec) A notification by of the last speed that was attained for this host |
void |
Release() Releases sources |
void | SetMetadata(string[] contacts, long throttle, string name, int maxSimul, string user) |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private string baseUrl
public int DOWNLOAD_IDEAL_TIME_RANGE
Range to keep download times within (seconds)
public Naanou.ResourceExchange.Source.Manifest FilledMarker
private int generation
private Naanou.Common.Hash id
private string[] metaContacts
private int metaMaxSimul
private string metaName
private long metaThrottle
private string metaUser
private System.Threading.ManualResetEvent mutex
private System.Threading.ReaderWriterLock rwl
private int simul
private int simulMax
The maximum simulatanous connections for this source
Constructor Detail |
---|
internal Source(Naanou.Common.Hash id, string baseUrl)
Constructor. Do not use, instead use DownloadManager.
Parameters:
baseUrl
- Base Url for downloading via hash, e.g. http://localhost:80/direct/id
- IdProperty Detail |
---|
public string BaseUrl
Gets the base url for the source e.g. http://localhost:80/direct/
public string ContactEmail
Gets Email address
public string ContactIM
Gets Instant message address
public string[] Contacts
Gets contacts listed for server, if any. (e-mail, im, web ordering)
public string ContactWeb
Gets web contact address
public int Generation
Gets the generation (0...n)
public bool IsAcquirable
Gives a rough indication of whether a source is available (i.e. the simulatenous transfers on it are not exceeding limit)
public int MaximumSimul
Maximum number of simulataneous connections the source supports (advertised)
public int SimultaneousDownloads
Gets the number of simul downloads happening on source
public long Throttle
Gets the advertised throttling rate for this source
public string Title
Gets a string suitable for UI to give the source a name
public string User
Gets user id (serial)
Method Detail |
---|
public void Acquire()
Acquire source. If source is being overloaded by us, this call will block until its ready
public Naanou.ResourceExchange.Source.Manifest Create(string resource, string discoveryMethod)
Create a manifest for a resource without any known bytes ranges
Parameters:
resource
- Hash serialpublic Naanou.ResourceExchange.Source.Manifest Create(string resource, Naanou.ResourceExchange.ByteRange[] ranges, string discoveryMethod)
Create a manifest for a resource, and known byte ranges
Parameters:
resource
- Hash serialranges
- Rangesprivate void DecrementGeneration()
public int GetHashCode()
private void IncrementGeneration()
public void LastDownloadSpeed(double bytesPerSec)
A notification by of the last speed that was attained for this host
Parameters:
bytesPerSec
- public void Release()
Releases sources
protected void SetMetadata(string[] contacts, long throttle, string name, int maxSimul, string user)
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |