rice.post.storage
Class ContentHashReference
java.lang.Object
rice.post.storage.ContentHashReference
-
All Implemented Interfaces:
- java.io.Serializable
-
Direct Known Subclasses:
-
EmailDataReference, LogEntryReference
-
public class ContentHashReference
- extends java.lang.Object
- implements java.io.Serializable
This class serves as a reference to a PostObject
stored in the Post system. This class knows both the
location in the network and the encryption key of the
corresponding PostData object.
This class has been extended to support multiple object locations
and keys, with each stored in ContentHash form. This is to allow
very large objects to be transparently broken up into a group of
smaller objects, and each fragment is stored seperately. Note that
a readObject() method has been defined to support the automatic
migration of old-style references to the new style.
- Version:
- $Id: ContentHashReference.java 2222 2005-02-11 17:47:34Z amislove $
- See Also:
- Serialized Form
Constructor Summary |
ContentHashReference(Id[] locations,
byte[][] keys)
Contructs a PostDataReference object given
the address and encryption key of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ContentHashReference
public ContentHashReference(Id[] locations,
byte[][] keys)
- Contructs a PostDataReference object given
the address and encryption key of the object.
- Parameters:
-
location
- The location in PAST of the PostData object-
key
- The encryption key of the PostData object
getLocations
public Id[] getLocations()
-
-
- Returns:
- The locations of the data referenced by this object
getKeys
public byte[][] getKeys()
-
-
- Returns:
- The encryption keys for the data
hashCode
public int hashCode()
-
- Overrides:
-
hashCode
in class java.lang.Object
-
equals
public boolean equals(java.lang.Object o)
-
- Overrides:
-
equals
in class java.lang.Object
-
toString
public java.lang.String toString()
-
- Overrides:
-
toString
in class java.lang.Object
-
Copyright © 2001-2005 - Rice Pastry.