org.kth.dks
Interface DHTSnapShotInterface


public interface DHTSnapShotInterface

The data stored in a DHT can be collected at a central point and stored, in the form of a snapshot. Collecting all entries in a DHT is a non atomic operation that takes time. Moreover, if the state of the entries is changed while the snaphot is taken, the snapshot can be incorrect. A call to the snapshot interfacew returns a snapsoht object that is filled by the DHT over time. The snapshot object can be queried for its status, and saved to disk when filled.


Method Summary
 java.util.List getItems()
           
 long intervalNotReceived()
          Returns the size of the non-filled interval
 boolean isDone()
          Returns true if the snapshot object has received the complete snapshot.
 void saveSnapShot(java.io.OutputStream oss)
           
 boolean waitForDone(int timeOut)
           
 

Method Detail

intervalNotReceived

long intervalNotReceived()
Returns the size of the non-filled interval


isDone

boolean isDone()
Returns true if the snapshot object has received the complete snapshot.


waitForDone

boolean waitForDone(int timeOut)

saveSnapShot

void saveSnapShot(java.io.OutputStream oss)
                  throws java.io.IOException
Throws:
java.io.IOException

getItems

java.util.List getItems()


Copyright © 2010. All Rights Reserved.