package net.f4fs.persistence;

import net.tomp2p.dht.PeerDHT;
import net.tomp2p.peers.Number160;
import net.tomp2p.storage.Data;


public interface IPersistence {
    
    /**
     * Get (latest) data from the peer with the given location key
     * 
     * @param pPeer Peer to fetch data from
     * @param pLocationKey Key from file
     *  
     * @return The fetched file as Data 
     */
    public Data getData(PeerDHT pPeer, Number160 pLocationKey);
    
    /**
     * Get the specified version of the file identified by its key.
     * In case, versions are not supported, get the only data.
     * 
     * @param pPeer Peer to fetch data from
     * @param pLocationKey Key from file
     * @param pVersionKey Version key
     * 
     * @return The fetched file as Data
     */
    public Data getDataOfVersion(PeerDHT pPeer, Number160 pLocationKey, Number160 pVersionKey);
    
    /**
     * Puts a new data object with the given location key to the DHT
     * 
     * @param pPeer Peer
     * @param pLocationKey Location key of the file
     * @param pData The content of the file
     */
    public void putData(PeerDHT pPeer, Number160 pLocationKey, Data pData);
    
    /**
     * Removes the specified data from the DHT.
     * In case versions are supported, remove all versions.
     *   
     * @param pPeer Peer
     * @param pKey Key which identifies the file to remove
     */
    public void removeData(PeerDHT pPeer, Number160 pKey);
    
    /**
     * Removes the data with the given version key. In case versions 
     * are not supported, remove just the file
     * 
     * @param pPeer Peer
     * @param pKey Key which identifies the file to remove
     * @param pVersionKey The version to delete
     */
    public void removeData(PeerDHT pPeer, Number160 pKey, Number160 pVersionKey);
}

@@ -379,16 +379,105 @@
 s Data %0A
+     * %0A     * @throws InterruptedException If a failure happened during await of future%0A
      */%0A
@@ -534,24 +534,52 @@
 LocationKey)
+ throws InterruptedException
 ;%0A    %0A    /
@@ -891,16 +891,105 @@
 as Data%0A
+     * %0A     * @throws InterruptedException If a failure happened during await of future%0A
      */%0A
@@ -1078,24 +1078,52 @@
 pVersionKey)
+ throws InterruptedException
 ;%0A    %0A    /
@@ -1319,24 +1319,113 @@
 of the file%0A
+     * %0A     * @throws InterruptedException If a failure happened during await of future%0A
      */%0A    
@@ -1494,16 +1494,44 @@
 a pData)
+ throws InterruptedException
 ;%0A    %0A 
@@ -1735,24 +1735,113 @@
 e to remove%0A
+     * %0A     * @throws InterruptedException If a failure happened during await of future%0A
      */%0A    
@@ -1893,16 +1893,44 @@
 60 pKey)
+ throws InterruptedException
 ;%0A    %0A 
@@ -2193,16 +2193,105 @@
  delete%0A
+     * %0A     * @throws InterruptedException If a failure happened during await of future%0A
      */%0A
@@ -2370,12 +2370,40 @@
 sionKey)
+ throws InterruptedException
 ;%0A%7D%0A

Add throws declaration