FileDocCategorySizeDatePackage
DDBaseValueImpl.javaAPI DocAzureus 3.0.3.42666Tue Mar 28 13:31:14 BST 2006org.gudy.azureus2.pluginsimpl.local.ddb

DDBaseValueImpl

public class DDBaseValueImpl extends Object implements DistributedDatabaseValue
author
parg

Fields Summary
private DDBaseContactImpl
contact
private Object
value
private byte[]
value_bytes
private long
creation_time
private long
version
protected static int
MAX_VALUE_SIZE
Constructors Summary
protected DDBaseValueImpl(DDBaseContactImpl _contact, Object _value, long _creation_time, long _version)

	
	 
	
			
						
						
						 
	
		 
	
		contact			= _contact;
		value			= _value;
		creation_time	= _creation_time;
		version			= _version;
		
		value_bytes	= DDBaseHelpers.encode( value );
		
		// don't police value size limit here as temporary large objects can be 
		// created when handling transfers
	
protected DDBaseValueImpl(DDBaseContactImpl _contact, byte[] _value_bytes, long _creation_time, long _version)

		contact			= _contact;
		value_bytes		= _value_bytes;
		creation_time	= _creation_time;
		version			= _version;
	
Methods Summary
protected byte[]getBytes()

		return( value_bytes );
	
public DistributedDatabaseContactgetContact()

		
		return( contact );
	
public longgetCreationTime()

		return( creation_time );
	
public java.lang.ObjectgetValue(java.lang.Class c)

		if ( value == null ){
			
			value = DDBaseHelpers.decode( c, value_bytes );
		}
		
		return( value );
	
public longgetVersion()

		return( version );