package org.jboss.test.cluster.ds;

import java.io.Serializable;

/** The public DistributedStateUser interface
 * 
 * @author Scott.Stark@jboss.org
 * @version $Revison:$
 */
public interface IDistributedState
{
   public static class NotifyData implements Serializable
   {
      public String category;
      public Serializable key;
      public Serializable value;
      public boolean locallyModified;
      public String toString()
      {
         StringBuffer tmp = new StringBuffer();
         tmp.append("category:");
         tmp.append(category);
         tmp.append(", key:");
         tmp.append(key);
         tmp.append(", value:");
         tmp.append(value);
         tmp.append(", locallyModified:");
         tmp.append(locallyModified);
         return tmp.toString();
      }
   }
   public Serializable get(Serializable key);
   public void put(Serializable key, Serializable value)
      throws Exception;
   public void remove(Serializable key)
      throws Exception;

   public void flush();
   public int size();

}
