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.


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

Method Detail

retrieved

void retrieved(Key key,
               Set<Serializable> entries,
               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(Key key,
              Serializable entry,
              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(Key key,
             Serializable entry,
             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.


Copyright © 2004-2008 Karsten Loesing, Sven Kaffille - Distributed and Mobile Systems Group, Lehrstuhl für Praktische Informatik, Universität Bamberg. All Rights Reserved.