View Javadoc

1   package org.exolab.jms.tools.migration;
2   
3   import javax.jms.JMSException;
4   
5   import org.exolab.jms.persistence.PersistenceException;
6   
7   
8   /***
9    * <code>Store</code> represents a persistent collection.
10   * It provides an API for importing and exporting the collection.
11   *
12   * @author <a href="mailto:tma@netspace.net.au">Tim Anderson</a>
13   * @version $Revision: 1.1 $ $Date: 2005/09/04 07:07:12 $
14   */
15  public interface Store {
16  
17      /***
18       * Export the collection.
19       *
20       * @return an iterator over the collection
21       * @throws JMSException for any JMS error
22       * @throws PersistenceException for any persistence error
23       */
24      StoreIterator exportCollection() throws JMSException, PersistenceException;
25  
26      /***
27       * Import a collection.
28       *
29       * @param iterator an iterator over the collection
30       * @throws JMSException for any JMS error
31       * @throws PersistenceException for any persistence error
32       */
33      void importCollection(StoreIterator iterator)
34              throws JMSException, PersistenceException;
35  
36      /***
37       * Returns the number of elements in the collection.
38       *
39       * @return the number of elements in the collection
40       * @throws PersistenceException for any persistence error
41       */
42      int size() throws PersistenceException;
43  
44  }