Class DDBaseTTTorrent
java.lang.Object
com.biglybt.pifimpl.local.ddb.DDBaseTTTorrent
- All Implemented Interfaces:
DistributedDatabaseTransferHandler, DistributedDatabaseTransferType
public class DDBaseTTTorrent
extends Object
implements DistributedDatabaseTransferType, DistributedDatabaseTransferHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate static final byteprivate Mapprivate DDBaseImplprivate Listprivate TorrentAttributeprivate static final booleanFields inherited from interface DistributedDatabaseTransferType
ST_TORRENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDownload(Download download) protected byte[]decrypt(byte[] hash, byte[] data) protected byte[]doCrypt(int mode, byte[] hash, byte[] data, int data_offset) protected byte[]encrypt(byte[] hash, byte[] data) read(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key) protected DistributedDatabaseValueread(DDBaseContactImpl contact, DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) voidremoveDownload(Download download) protected booleanwrite(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value)
-
Field Details
-
TRACE
private static final boolean TRACE- See Also:
-
CRYPTO_VERSION
private static final byte CRYPTO_VERSION- See Also:
-
ddb
-
ta_sha1
-
crypto_tested
private boolean crypto_tested -
crypto_available
private boolean crypto_available -
external_downloads
-
data_cache
-
-
Constructor Details
-
DDBaseTTTorrent
-
-
Method Details
-
addDownload
-
removeDownload
-
read
public DistributedDatabaseValue read(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key) throws DistributedDatabaseException - Specified by:
readin interfaceDistributedDatabaseTransferHandler- Throws:
DistributedDatabaseException
-
write
public DistributedDatabaseValue write(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value) throws DistributedDatabaseException - Specified by:
writein interfaceDistributedDatabaseTransferHandler- Throws:
DistributedDatabaseException
-
read
protected DistributedDatabaseValue read(DDBaseContactImpl contact, DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) throws DistributedDatabaseException - Throws:
DistributedDatabaseException
-
encrypt
protected byte[] encrypt(byte[] hash, byte[] data) -
decrypt
protected byte[] decrypt(byte[] hash, byte[] data) -
doCrypt
protected byte[] doCrypt(int mode, byte[] hash, byte[] data, int data_offset) -
testCrypto
protected boolean testCrypto()
-