P-Grid v2.0a2 API Specification

p2p.storage
Interface DataItem

All Superinterfaces:
Comparable

public interface DataItem
extends Comparable

Defines the operations that all data items stored on the network support.

Version:
1.0.0
Author:
@author Roman Schmidt

Method Summary
 Object getData()
          Get the item's content.
 GUID getGUID()
          Get the ID of the item.
 Key getKey()
          Get the key index of the item.
 Peer getPeer()
          Get the host responsible for this item.
 Type getType()
          Get the item's type of content.
 void setData(Object newData)
          Set the item's content.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getKey

Key getKey()
Get the key index of the item.

Returns:
the Key index

getGUID

GUID getGUID()
Get the ID of the item.

Returns:
the Key index

getType

Type getType()
Get the item's type of content.

Returns:
the Type of the item's content

getData

Object getData()
Get the item's content.

Returns:
an Object reference to the data

setData

void setData(Object newData)
Set the item's content.

Parameters:
newData - the new data

getPeer

Peer getPeer()
Get the host responsible for this item.

Returns:
a Peer reference to the host

P-Grid v2.0a2 API Specification

This is open source software distributed under the terms of the GNU General Public License, a copy of which is included in the file LICENSE. If not you can find the GPL at http://www.gnu.org/copyleft/gpl.txt