ePOST API

rice.p2p.glacier
Interface VersioningPast

All Known Implementing Classes:
AggregationImpl, GlacierImpl

public interface VersioningPast

Version:
$Id: VersioningPast.java 2042 2004-09-03 23:36:52Z ahae $
Author:
Andreas Haeberlen

Method Summary
 void lookup(Id id, long version, Continuation command)
          Retrieves the object stored in this instance of Past with the given ID and the specified version.
 void lookupHandles(Id id, long version, int num, Continuation command)
          Retrieves the handles of up to max replicas of the object stored in this instance of Past with the given ID.
 void refresh(Id[] ids, long[] versions, long[] expirations, Continuation command)
          Updates the objects stored under the provided keys id to expire no earlier than the provided expiration time.
 

Method Detail

lookup

void lookup(Id id,
            long version,
            Continuation command)
Retrieves the object stored in this instance of Past with the given ID and the specified version. Asynchronously returns a PastContent object as the result to the provided Continuation, or a PastException.

Parameters:
id - the key to be queried
command - Command to be performed when the result is received

lookupHandles

void lookupHandles(Id id,
                   long version,
                   int num,
                   Continuation command)
Retrieves the handles of up to max replicas of the object stored in this instance of Past with the given ID. Asynchronously returns an array of PastContentHandles as the result to the provided Continuation, or a PastException. Each replica handle is obtained from a different primary storage root for the the given key. If max exceeds the replication factor r of this Past instance, only r replicas are returned. This method will return a PastContentHandle[] array containing all of the handles.

Parameters:
id - the key to be queried
version - the requested version
max - the maximal number of replicas requested
command - Command to be performed when the result is received

refresh

void refresh(Id[] ids,
             long[] versions,
             long[] expirations,
             Continuation command)
Updates the objects stored under the provided keys id to expire no earlier than the provided expiration time. Asyncroniously returns the result to the caller via the provided continuation. The result of this operation is an Object[], which is the same length as the input array of Ids. Each element in the array is either Boolean(true), representing that the refresh succeeded for the cooresponding Id, or an Exception describing why the refresh failed. Specifically, the possible exceptions which can be returned are: ObjectNotFoundException - if no object was found under the given key RefreshFailedException - if the refresh operation failed for any other reason (the getMessage() will describe the failure)

Parameters:
id - The keys which to refresh
version - The versions which to refresh
expiration - The time to extend the lifetime to
command - Command to be performed when the result is received

ePOST API

Copyright © 2001-2005 - Rice Pastry.