Package com.biglybt.pifimpl.local.ddb
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 boolean
private boolean
private static final byte
private Map
private DDBaseImpl
private List
private TorrentAttribute
private static final boolean
Fields inherited from interface com.biglybt.pif.ddb.DistributedDatabaseTransferType
ST_TORRENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDownload
(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 DistributedDatabaseValue
read
(DDBaseContactImpl contact, DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout) void
removeDownload
(Download download) protected boolean
write
(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:
read
in interfaceDistributedDatabaseTransferHandler
- Throws:
DistributedDatabaseException
-
write
public DistributedDatabaseValue write(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value) throws DistributedDatabaseException - Specified by:
write
in 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()
-