gps.protocol.BT.param
Class BTTorrent

java.lang.Object
  extended by gps.protocol.BT.param.BTTorrent

public class BTTorrent
extends java.lang.Object

Torrent class includes informations in the .torrent file. Torrent metainfo file includes the following keys: announce: the URL of the tracker name: file name piece length: block size pieces: hash of each piece length: file size path: file path In our simulation, only relavent information is included Note: hash of each piece is only for verification purpose! The torrent file and the corresponding document is indexed by the docHashKey

Version:
1.2, 6/20/2005
Author:
Weishuai Yang

Field Summary
 java.lang.String mDocHashKey
          doc hash key
 double mLength
          document length
 double mPieceLength
          piece length
 int mPieceNum
          total piece number
 int mPopularity
          document popularity
 BTTracker mTracker
          reference to tracker where this torrent is stored at
 
Constructor Summary
BTTorrent(BTDocument doc, BTTracker t)
          constructs a BTTorrent object
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTracker

public BTTracker mTracker
reference to tracker where this torrent is stored at


mDocHashKey

public java.lang.String mDocHashKey
doc hash key


mLength

public double mLength
document length


mPieceLength

public double mPieceLength
piece length


mPieceNum

public int mPieceNum
total piece number


mPopularity

public int mPopularity
document popularity

Constructor Detail

BTTorrent

public BTTorrent(BTDocument doc,
                 BTTracker t)
constructs a BTTorrent object

Parameters:
doc - the document related to the torrent
t - tracker