User: slaboure
  Date: 01/11/26 09:27:56

  Modified:    src/main/org/jboss/ha/hasessionstate/interfaces
                        HASessionState.java
  Log:
  Added javadoc comments
  
  Revision  Changes    Path
  1.2       +59 -13    
jbossmx/src/main/org/jboss/ha/hasessionstate/interfaces/HASessionState.java
  
  Index: HASessionState.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/hasessionstate/interfaces/HASessionState.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HASessionState.java       2001/11/09 22:49:03     1.1
  +++ HASessionState.java       2001/11/26 17:27:56     1.2
  @@ -13,10 +13,11 @@
   /**
    *   Interface for services providing clustered state session availability
    *
  - *   @see HASessionStateImpl
  - *   @author [EMAIL PROTECTED]
  - *   @version $Revision: 1.1 $
  + *   @see org.jboss.ha.hasessionstate.server.HASessionStateImpl
    *
  + *   @author <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>
  + *   @version $Revision: 1.2 $
  + *
    * <p><b>Revisions:</b><br>
    */
   
  @@ -26,43 +27,88 @@
      public void init () throws Exception;
      public void start () throws Exception;
      
  -   // Information that can be used to clean a cache for example. It indicates that
  -   // another node has touched a session that we were previously owning
  -   //
  +   /**
  +    * Information that can be used to clean a cache for example. It indicates that
  +    * another node has touched a session that we were previously owning.
  +    *
  +    */   
      public interface HASessionStateListener
      {
         public void sessionExternallyModified (PackagedSession session);
      }
  +   /**
  +    * Subscribe to receive notifications when objects gets modified on another node.
  +    *
  +    */   
      public void subscribe (String appName, HASessionStateListener listener);
      public void unsubscribe (String appName, HASessionStateListener listener);
      
  -   // Information that can be used to update its view of the sub-partition. Raised 
when
  -   // a new topology is computed.
  -   //
  +    /**
  +     * Information that can be used to update its view of the sub-partition. Raised 
when
  +     * a new topology is computed.
  +     */
      public interface HASessionStateTopologyListener
      {
         public void newSessionStateTopology (HAPartition haSubPartition, boolean 
partitionHasChanged);
      }
   
  +   /**
  +    * Subscribes to receives notification when a new subpartition topology has been 
computed.
  +    */   
      public void subscribe (HASessionStateTopologyListener listener);
      public void unsubscribe (HASessionStateTopologyListener listener);
      
      public HAPartition getCurrentHAPartition ();
      
  -   // Return the name of this node as used in the computations
  -   //
  +   /**
  +    * Return the name of this node as used in the computations
  +    */   
      public String getNodeName ();
      
  -   // Methods used to manage the internal state of the sub-partition
  -   //
  +   /**
  +    * Share a new session state in the sub-partition of this cluster
  +    * @param appName Application name for which is state is shared
  +    * @param keyId Key identifier of the state
  +    */   
      public void createSession (String appName, Object keyId);
  +   /**
  +    * Modifies a state already shared
  +    * @param appName Application name hosting this state
  +    * @param keyId Key identifier of the state to modify
  +    * @param state New state
  +    */   
      public void setState (String appName, Object keyId, byte[] state);
      
  +   /**
  +    * Get a particular state
  +    * @param appName Application hosting the state
  +    * @param keyId Key identifier of the state
  +    * @return The state value
  +    */   
      public PackagedSession getState (String appName, Object keyId);
  +   /**
  +    * Get a state and, if it is not already the case, takes its ownership (a state 
is
  +    * always owned by a node)
  +    * @param appName Application hosting the state
  +    * @param keyId Key identifier of the state
  +    * @throws RemoteException Thrown if an exception occurs while getting the 
ownership of the state
  +    * @return The state value
  +    */   
      public PackagedSession getStateWithOwnership (String appName, Object keyId) 
throws java.rmi.RemoteException;
      
  +   /**
  +    * Take ownership of a state. Each state is owned by a node.
  +    * @param appName Application hosting the state
  +    * @param keyId Key identifier of the state
  +    * @throws RemoteException Trown if a communication exception occurs while 
asking other node to get the ownership
  +    */   
      public void takeOwnership (String appName, Object keyId) throws 
java.rmi.RemoteException;
         
  +   /**
  +    * Remove a session from the sub-partition
  +    * @param appName Application hosting the state
  +    * @param keyId Key identifier of the state
  +    */   
      public void removeSession (String appName, Object keyId);
      
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to