next up previous contents
Next: Figure.java Up: Java source files Previous: Java source files

Cacheable.java

 
package relay;

public interface Cacheable {
  // This interface allows application specific data to tell the
  // cache how to update it.  At minimum, the update returned by
  // this method should assign values to the Update.objname and
  // Update.obj fields.  The Update.objname field should initially
  // be set to String("-1") to tell the server that it is a new
  // object. Subsequent updates should use the objname string
  // passed in setName() argument.


  public Update getUpdate();
  public void setName(String name);

  // Ideally the Cacheable interface would also have an applyUpdate()
  // method.  That way application specific data would be able to
  // update itself appropriately.  This method would also eliminate
  // the need for the setName() method because the applyUpdate()
  // method could get the name from the Update.objname field.
  // However, since this simple shared data space replaces objects in
  // the cache with new updated versions, applyUpdate() is
  // unnecessary.

  // public void applyUpdate(Update u);
}



Carmine F. Greco
Wed Mar 26 23:44:38 EST 1997