📄 versioningpast.java
字号:
/*************************************************************************"FreePastry" Peer-to-Peer Application Development Substrate Copyright 2002, Rice University. All rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions aremet:- Redistributions of source code must retain the above copyrightnotice, this list of conditions and the following disclaimer.- Redistributions in binary form must reproduce the above copyrightnotice, this list of conditions and the following disclaimer in thedocumentation and/or other materials provided with the distribution.- Neither the name of Rice University (RICE) nor the names of itscontributors may be used to endorse or promote products derived fromthis software without specific prior written permission.This software is provided by RICE and the contributors on an "as is"basis, without any representations or warranties of any kind, expressor implied including, but not limited to, representations orwarranties of non-infringement, merchantability or fitness for aparticular purpose. In no event shall RICE or contributors be liablefor any direct, indirect, incidental, special, exemplary, orconsequential damages (including, but not limited to, procurement ofsubstitute goods or services; loss of use, data, or profits; orbusiness interruption) however caused and on any theory of liability,whether in contract, strict liability, or tort (including negligenceor otherwise) arising in any way out of the use of this software, evenif advised of the possibility of such damage.********************************************************************************/package rice.p2p.glacier;import rice.*;import rice.p2p.commonapi.*;/** * @(#) VersioningPast.java This interface is exported by a PAST instance that * offers access to specific versions of an object. * * @version $Id: VersioningPast.java 2042 2004-09-03 23:36:52Z ahae $ * @author Andreas Haeberlen */public interface VersioningPast { /** * 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. * * @param id the key to be queried @ * @param version the requested version * @param command Command to be performed when the result is received */ public void lookup(Id id, long version, 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. * * @param id the key to be queried * @param version the requested version * @param command Command to be performed when the result is received * @param num DESCRIBE THE PARAMETER */ public void lookupHandles(Id id, long version, int num, 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) * * @param command Command to be performed when the result is received * @param ids DESCRIBE THE PARAMETER * @param versions DESCRIBE THE PARAMETER * @param expirations DESCRIBE THE PARAMETER */ public void refresh(Id[] ids, long[] versions, long[] expirations, Continuation command);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -