Rice Pastry API

rice.p2p.past
Interface PastContent

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ContentHashPastContent, PastRegrTest.TestPastContent

public interface PastContent
extends java.io.Serializable

Version:
$Id: PastContent.java,v 1.3 2003/06/06 06:40:12 amislove Exp $
Author:
Alan Mislove, Ansley Post, Peter Druschel

Method Summary
 rice.p2p.past.PastContent checkInsert(rice.p2p.commonapi.Id id, rice.p2p.past.PastContent existingContent)
          Checks if a insert operation should be allowed.
 rice.p2p.past.PastContentHandle getHandle(rice.p2p.past.Past local)
          Produces a handle for this content object.
 rice.p2p.commonapi.Id getId()
          Returns the Id under which this object is stored in Past.
 boolean isMutable()
          States if this content object is mutable.
 

Method Detail

checkInsert

public rice.p2p.past.PastContent checkInsert(rice.p2p.commonapi.Id id,
                                             rice.p2p.past.PastContent existingContent)
                                      throws PastException
Checks if a insert operation should be allowed. Invoked when a Past node receives an insert request and it is a replica root for the id; invoked on the object to be inserted. This method determines the effect of an insert operation on an object that already exists: it computes the new value of the stored object, as a function of the new and the existing object.

Parameters:
id - the key identifying the object
Returns:
null, if the operation is not allowed; else, the new object to be stored on the local node.
PastException

getHandle

public rice.p2p.past.PastContentHandle getHandle(rice.p2p.past.Past local)
Produces a handle for this content object. The handle is retrieved and returned to the client as a result of the Past.lookupHandles() method.

Returns:
the handle

getId

public rice.p2p.commonapi.Id getId()
Returns the Id under which this object is stored in Past.

Returns:
the id

isMutable

public boolean isMutable()
States if this content object is mutable. Mutable objects are not subject to dynamic caching in Past.

Returns:
true if this object is mutable, else false

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection