|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
A segment of a resource that has been downloaded or is currently being downloaded
Field Summary | |
---|---|
int | accesses |
Naanou.ResourceExchange.DownloaderQueue |
downloaders
Queue of string addresses |
long |
End
End byte (0-based) |
bool | expired |
string |
Filename
Absolute filename for block |
string |
Hash
Content hash for file block belongs too |
bool | incomplete |
long |
Length
File length of original file if known (less than 0 if not) |
bool | requiredLocally |
long |
Start
Start byte number (0-based) |
Constructor Summary | |
---|---|
Block(long start, long end, long length, string hash, string filename) Constructor |
Property Summary | |
---|---|
int |
Accesses
Gets the number of accesses this block has had |
string |
Downloaders
Gets a space-delimited list of recent downloaders |
bool |
Incomplete
Gets or sets whether block is still being written to |
bool |
IsExpired
Has block been expired by block storage system? |
bool |
OnDisk
Checks block is on disk |
bool |
RequiredLocally
Gets or sets whether block is still required locally, and should not be deleted |
Method Summary | |
---|---|
void |
AddDownloader(string address) Adds a downloader in id|url form |
long |
GetLength() Gets the number of bytes represented by this block (does not check file size) |
void |
IncrementAccesses() Increments the accesses counter |
void |
Retire() Retires block from 'in use' queue, and puts them in the general block pool |
void | SetExpired(bool expired) |
void | SetIncomplete(bool val) |
void |
SetRequiredLocally(bool required) Sets whether this block is required locally. This manual override is used by the GC cleaning up incomplete blocks. |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private int accesses
private Naanou.ResourceExchange.DownloaderQueue downloaders
Queue of string addresses
internal long End
End byte (0-based)
private bool expired
internal string Filename
Absolute filename for block
internal string Hash
Content hash for file block belongs too
private bool incomplete
internal long Length
File length of original file if known (less than 0 if not)
private bool requiredLocally
internal long Start
Start byte number (0-based)
Constructor Detail |
---|
internal Block(long start, long end, long length, string hash, string filename)
Constructor
Parameters:
start
- Start rangeend
- End rangehash
- Parent file hashfilename
- Absolute filename to store block atlength
- File length (or -1 if unknown)Property Detail |
---|
internal int Accesses
Gets the number of accesses this block has had
internal string Downloaders
Gets a space-delimited list of recent downloaders
internal bool Incomplete
Gets or sets whether block is still being written to
internal bool IsExpired
Has block been expired by block storage system?
internal bool OnDisk
Checks block is on disk
internal bool RequiredLocally
Gets or sets whether block is still required locally, and should not be deleted
Method Detail |
---|
internal void AddDownloader(string address)
Adds a downloader in id|url form
Parameters:
address
- internal long GetLength()
Gets the number of bytes represented by this block (does not check file size)
Returns:
internal void IncrementAccesses()
Increments the accesses counter
internal void Retire()
Retires block from 'in use' queue, and puts them in the general block pool
internal void SetExpired(bool expired)
internal void SetIncomplete(bool val)
internal void SetRequiredLocally(bool required)
Sets whether this block is required locally. This manual override is used by the GC cleaning up incomplete blocks.
Parameters:
required
-
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |