de.uniba.wiai.lspi.chord.service
Interface ChordCallback


public interface ChordCallback

This is the interface that must be implemented by classes that can be used as callback for method invocations on AsynChord.

An instance of this must be passed as parameter to on of the methods:

On termination of those methods the corresponding callback method on this is called. These methods are: The Throwable parameter of these methods is null if the corresponding method has been executed successfully.

Version:
1.0.5 modified, 0.99b
Author:
sven, bojanm

Method Summary
 void inserted(java.lang.String res, java.io.Serializable entry, java.lang.Throwable t)
          This method is called, when a call to AsynChord#insert(Key, Serializable, ChordCallback) has been finished.
 void removed(java.lang.String res, java.io.Serializable entry, java.lang.Throwable t)
          This is the callback method for removal of the entry with key.
 void retrieved(java.lang.String res, java.util.Set<java.io.Serializable> entries, java.lang.Throwable t)
          This is the callback method for retrieval of values associated with key.
 

Method Detail

retrieved

void retrieved(java.lang.String res,
               java.util.Set<java.io.Serializable> entries,
               java.lang.Throwable t)
This is the callback method for retrieval of values associated with key. This method is called when an invocation of AsynChord#retrieve(Key, ChordCallback) has finished.

Parameters:
key - The Key that has been used for the retrieval.
entries - The retrieved entries. Empty Set, if no values are associated with key.
t - Any Throwable that occured during execution of AsynChord#retrieve(Key, ChordCallback). This is null if retrieval of key was succesful.

inserted

void inserted(java.lang.String res,
              java.io.Serializable entry,
              java.lang.Throwable t)
This method is called, when a call to AsynChord#insert(Key, Serializable, ChordCallback) has been finished.

Parameters:
key - The Key that should be used for insertion.
entry - The entry that should be inserted.
t - Any Throwable that occured during execution of AsynChord#insert(Key, Serializable, ChordCallback). This is null if insertion of key and entry was succesful.

removed

void removed(java.lang.String res,
             java.io.Serializable entry,
             java.lang.Throwable t)
This is the callback method for removal of the entry with key.

Parameters:
key - The Key of the entry that should be removed.
entry - The entry that should be removed.
t - Any Throwable that occured during execution of AsynChord#remove(Key, Serializable, ChordCallback). This is null if removal of entry was succesful.