KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > server > journal > IJournal


1 package com.ubermq.jms.server.journal;
2
3 import com.ubermq.jms.common.datagram.MessageId;
4 import com.ubermq.kernel.DatagramSink;
5 import com.ubermq.kernel.IMessageProcessor;
6
7 /**
8  * A journalling system interface that provides a transactionally
9  * safe, atomic, durable information store.
10  * <P>
11  * The journal performs several high level operations:
12  * output data, acknowledge successful receipt of data,
13  * recover unacknowledged data, and checkpoint.
14  */

15 public interface IJournal
16     extends DatagramSink
17 {
18     /**
19      * Acknowledges a message that was previously output.
20      */

21     public void ack(MessageId id);
22     
23     /**
24      * Recovers the log by resending unacknowledged messages
25      * to the specified message processor.
26      */

27     public void recover(IMessageProcessor processor);
28     
29     /**
30      * Writes the current committed state out to the journal
31      * so that resumption from a failure does not require full analysis
32      * of all transactions that occurred on the system.
33      */

34     public void checkpoint();
35     
36     /**
37      * Closes the journal and releases any resources associated with it.
38      */

39     public void close();
40     
41     /**
42      * Permanently destroys the journal infrastructure and eliminates
43      * all data stored in it.
44      */

45     public void destroy();
46 }
47
Popular Tags