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
Class PastPolicy.DefaultPastPolicy

    java.lang.Object
      rice.p2p.past.PastPolicy.DefaultPastPolicy

All Implemented Interfaces:
  PastPolicy

Enclosing class:
  PastPolicy

public static class PastPolicy.DefaultPastPolicy
extends java.lang.Object
implements PastPolicy

The default policy for Past, which fetches any available copy of a replicated object and always allows inserts locally.

Version:
  $Id: pretty.settings,v 1.3 2005/03/11 20:22:33 jeffh Exp $
Author:
  Alan Mislove

Nested Class Summary

Nested classes inherited from class rice.p2p.past.PastPolicy
`PastPolicy.DefaultPastPolicy`

Constructor Summary
`PastPolicy.DefaultPastPolicy()`

Method Summary
`boolean` | `allowInsert(PastContent content)` This method always return true;
`void` | `fetch(Id id, NodeHandle hint, Cache backup, Past past, Continuation command)` This method fetches the object via a lookup() call.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PastPolicy.DefaultPastPolicy

    public PastPolicy.DefaultPastPolicy()

Method Detail

### fetch

    public void fetch(Id id,
                      NodeHandle hint,
                      Cache backup,
                      Past past,
                      Continuation command)

  This method fetches the object via a lookup() call.

  Specified by:
    `fetch` in interface `PastPolicy`
  Parameters:
    `id` - The id to fetch
    `hint` - A hint as to where the key might be
    `backup` - The backup cache, where the object *might* be located
    `past` - The local past instance
    `command` - The command to call with the replica to store

### allowInsert

    public boolean allowInsert(PastContent content)

  This method always return true;

  Specified by:
    `allowInsert` in interface `PastPolicy`
  Parameters:
    `content` - The content about to be stored
  Returns:
    Whether the insert should be allowed

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.