API Documentation: Class DataAddress

Name DataAddress
Package com.mckoi.network

Represents the address of some data stored in the network data address space, encoded as a 64-bit value.

A DataAddress is a block_id and data_id component which references a string of data in the network data address space. Internally, these components are encoded as a 64-bit value. The data_id part is encoded in the lower 14 bits of the value limiting the number of individual items stored in a block to 16384 elements. The remaining 50 bits of the value represent the block id, which is a limit of 1 peta-blocks.

Methods Summary

long getValue()
long getBlockId()
int getDataId()
DataAddress max(DataAddress address)
String formatString()
static DataAddress parseString(String str)
String toString()
int hashCode()
boolean equals(Object ob)

Method Details

long getValue()

Returns the address value in 64-bit encoded form.

long getBlockId()

Returns the block id part of the address value.

int getDataId()

Returns the data id part of the address value.

DataAddress max(DataAddress address)

Returns this object if this data address is greater than or equal to the given address, otherwise returns the given address.

String formatString()

Formats this object as a string (which can be parsed by the parse method).

DataAddress parseString(String str)

Returns the DataAddress object parsed from the given string.

String toString()

int hashCode()

boolean equals(Object ob)

The text on this page is licensed under the Creative Commons Attribution 3.0 License. Java is a registered trademark of Sun Microsystems, Inc.
Mckoi is Copyright © 2000 - 2012 Diehl and Associates, Inc. All rights reserved.