RegisterSign In

API Documentation: Class DataAddress

Package: com.mckoi.network

Represents the address of some data stored in the network data address space, encoded as an 124-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 an 124-bit value. The data_id part is encoded in the lower 16 bits of the value limiting the number of individual items stored in a block to 65536 elements. The remaining 108 bits of the value represent the block id, which has a limit of 3.24E+32 blocks.

Typically a block will be represented as a numbered file in the block directory of the storage machine.

Note that the address space is very large. The reason for the large address space is to provide flexibility in how regions of the address space are allocated. It is not expected for the available address space to be used compactly. In practice, the amount of data stored in the address space is expected to be many factors smaller than the logical bounds.

Methods Summary

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

Method Details

NodeReference getValue()

Returns the address value as a NodeReference.

BlockId 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).

static 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 Oracle and/or its affiliates.
Mckoi is Copyright © 2000 - 2020 Diehl and Associates, Inc. All rights reserved.