Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.past
Interface PastContent

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  GCPastContent

All Known Implementing Classes:
  Aggregate, ContentHashPastContent, DebugContent, PastRegrTest.TestPastContent

public interface PastContent
extends java.io.Serializable

Version:
  $Id: PastContent.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
  Alan Mislove, Ansley Post, Peter Druschel

Method Summary
`PastContent` | `checkInsert(Id id, PastContent existingContent)` Checks if a insert operation should be allowed.
`PastContentHandle` | `getHandle(Past local)` Produces a handle for this content object.
`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 PastContent checkInsert(Id id,
                                   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
    `existingContent` - DESCRIBE THE PARAMETER
  Returns:
    null, if the operation is not allowed; else, the new object to be stored on the local node.
  Throws:
    `PastException` - DESCRIBE THE EXCEPTION

### getHandle

    public PastContentHandle getHandle(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.

  Parameters:
    `local` - DESCRIBE THE PARAMETER
  Returns:
    the handle

### getId

    public 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.