com.aelitis.azureus.core.dht.db.impl
Class DHTDBValueImpl
java.lang.Object
com.aelitis.azureus.core.dht.db.impl.DHTDBValueImpl
- All Implemented Interfaces:
- DHTDBValue, DHTTransportValue
public class DHTDBValueImpl
- extends java.lang.Object
- implements DHTDBValue
- Author:
- parg
Constructor Summary |
protected |
DHTDBValueImpl(DHTTransportContact _sender,
DHTTransportValue _other,
boolean _local)
Constructor used to generate values for relaying to other contacts
or receiving a value from another contact - adjusts the sender
Originator, creation time, flags and value are fixed. |
protected |
DHTDBValueImpl(long _creation_time,
byte[] _value,
int _version,
DHTTransportContact _originator,
DHTTransportContact _sender,
boolean _local,
int _flags,
int _life_hours,
byte _rep_control)
constructor for the originator of values only |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DHTDBValueImpl
protected DHTDBValueImpl(long _creation_time,
byte[] _value,
int _version,
DHTTransportContact _originator,
DHTTransportContact _sender,
boolean _local,
int _flags,
int _life_hours,
byte _rep_control)
- constructor for the originator of values only
- Parameters:
_creation_time
- _value
- _originator
- _sender
- _distance
- _flags
-
DHTDBValueImpl
protected DHTDBValueImpl(DHTTransportContact _sender,
DHTTransportValue _other,
boolean _local)
- Constructor used to generate values for relaying to other contacts
or receiving a value from another contact - adjusts the sender
Originator, creation time, flags and value are fixed.
- Parameters:
_sender
- _other
-
reset
protected void reset()
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interface DHTTransportValue
setCreationTime
protected void setCreationTime()
setStoreTime
protected void setStoreTime(long l)
getStoreTime
protected long getStoreTime()
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface DHTTransportValue
getValue
public byte[] getValue()
- Specified by:
getValue
in interface DHTTransportValue
getVersion
public int getVersion()
- Specified by:
getVersion
in interface DHTTransportValue
getOriginator
public DHTTransportContact getOriginator()
- Specified by:
getOriginator
in interface DHTTransportValue
getSender
public DHTTransportContact getSender()
getFlags
public int getFlags()
- Specified by:
getFlags
in interface DHTTransportValue
setFlags
public void setFlags(byte _flags)
- Specified by:
setFlags
in interface DHTDBValue
getLifeTimeHours
public int getLifeTimeHours()
- Specified by:
getLifeTimeHours
in interface DHTTransportValue
getReplicationControl
public byte getReplicationControl()
- Specified by:
getReplicationControl
in interface DHTTransportValue
getReplicationFactor
public byte getReplicationFactor()
- Specified by:
getReplicationFactor
in interface DHTTransportValue
getReplicationFrequencyHours
public byte getReplicationFrequencyHours()
- Specified by:
getReplicationFrequencyHours
in interface DHTTransportValue
setOriginatorAndSender
protected void setOriginatorAndSender(DHTTransportContact _originator)
getValueForRelay
public DHTDBValue getValueForRelay(DHTTransportContact _sender)
- Specified by:
getValueForRelay
in interface DHTDBValue
getValueForDeletion
public DHTDBValue getValueForDeletion(int _version)
getString
public java.lang.String getString()
- Specified by:
getString
in interface DHTTransportValue