Rice Pastry API

rice.p2p.past
Class PastPolicy.DefaultPastPolicy

java.lang.Object
  extended by rice.p2p.past.PastPolicy.DefaultPastPolicy
All Implemented Interfaces:
PastPolicy
Enclosing interface:
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.

Author:
Alan Mislove

Nested Class Summary
 
Nested classes/interfaces inherited from interface 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

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection