LimeWire Consolidated API

com.limegroup.gnutella.dht.db
Interface AltLocValueFactory

All Superinterfaces:
DHTValueFactory<AltLocValue>
All Known Implementing Classes:
AltLocValueFactoryImpl

public interface AltLocValueFactory
extends DHTValueFactory<AltLocValue>

Defines an interface to create alternative location values.


Method Summary
 AltLocValue createAltLocValueForSelf(long fileSize, byte[] ttroot)
          Creates an alternative location value for this node.
 AltLocValue createDHTValue(DHTValueType type, Version version, byte[] value)
          Creates a DHTValue.
 AltLocValue createFromData(Version version, byte[] data)
          Creates an alternative location value.
 

Method Detail

createDHTValue

AltLocValue createDHTValue(DHTValueType type,
                           Version version,
                           byte[] value)
                           throws DHTValueException
Description copied from interface: DHTValueFactory
Creates a DHTValue.

Specified by:
createDHTValue in interface DHTValueFactory<AltLocValue>
Parameters:
type - The type of the value
version - The version of the value
value - The actual value
Throws:
DHTValueException

createFromData

AltLocValue createFromData(Version version,
                           byte[] data)
                           throws DHTValueException
Creates an alternative location value.

Throws:
DHTValueException

createAltLocValueForSelf

AltLocValue createAltLocValueForSelf(long fileSize,
                                     byte[] ttroot)
Creates an alternative location value for this node.

Parameters:
fileSize - size of the file
ttroot - root hash of the TigerTree

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.