rice.p2p.past
Interface PastPolicy
- All Known Implementing Classes:
- PastPolicy.DefaultPastPolicy
- public interface PastPolicy
- Version:
- $Id: PastPolicy.java 2302 2005-03-11 00:58:26Z jeffh $
- Author:
- Alan Mislove
Nested Class Summary |
static class |
PastPolicy.DefaultPastPolicy
The default policy for Past, which fetches any available copy of a
replicated object and always allows inserts locally. |
fetch
public void fetch(Id id,
NodeHandle hint,
Cache backup,
Past past,
Continuation command)
- This method is called when Past is told to fetch a key. This method allows
the application to specify how a replica is fetched and authenticated. The
client should fetch the object (possibly using the past instance provided)
and then return the object to the provided continuation. The client *MUST*
call the continuation at some point in the future, even if the request is
lost.
- Parameters:
id
- The id to fetchpast
- The local past instancebackup
- The backup cache, where the object *might* be locatedcommand
- The command to call with the replica to storehint
- DESCRIBE THE PARAMETER
allowInsert
public boolean allowInsert(PastContent content)
- This method is call before an insert() is processed on the local node. This
allows applications to make a decision on whether or not to store the
replica. Unless you know what you are doing, don't return anything but
'true' here.
- Parameters:
content
- The content about to be stored
- Returns:
- Whether the insert should be allowed
Copyright © 2001-2005 - Rice Pastry.