org.gudy.azureus2.pluginsimpl.local.ddb
Class DDBaseTTTorrent

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.ddb.DDBaseTTTorrent
All Implemented Interfaces:
DistributedDatabaseTransferHandler, DistributedDatabaseTransferType

public class DDBaseTTTorrent
extends java.lang.Object
implements DistributedDatabaseTransferType, DistributedDatabaseTransferHandler

Author:
parg

Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.ddb.DistributedDatabaseTransferType
ST_TORRENT
 
Constructor Summary
protected DDBaseTTTorrent(DDBaseImpl _ddb)
           
 
Method Summary
 void 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)
           
protected  DistributedDatabaseValue read(DDBaseContactImpl contact, DistributedDatabaseProgressListener listener, DistributedDatabaseTransferType type, DistributedDatabaseKey key, long timeout)
           
 DistributedDatabaseValue read(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key)
           
 void removeDownload(Download download)
           
protected  boolean testCrypto()
           
 DistributedDatabaseValue write(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDBaseTTTorrent

protected DDBaseTTTorrent(DDBaseImpl _ddb)
Method Detail

addDownload

public void addDownload(Download download)

removeDownload

public void removeDownload(Download download)

read

public DistributedDatabaseValue read(DistributedDatabaseContact contact,
                                     DistributedDatabaseTransferType type,
                                     DistributedDatabaseKey key)
                              throws DistributedDatabaseException
Specified by:
read in interface DistributedDatabaseTransferHandler
Throws:
DistributedDatabaseException

write

public DistributedDatabaseValue write(DistributedDatabaseContact contact,
                                      DistributedDatabaseTransferType type,
                                      DistributedDatabaseKey key,
                                      DistributedDatabaseValue value)
                               throws DistributedDatabaseException
Specified by:
write in interface DistributedDatabaseTransferHandler
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()