KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > perseus > fos > api > FosManager


1 /**
2  * Copyright (C) 2000
3  */

4
5 package org.objectweb.perseus.fos.api;
6
7 import javax.transaction.xa.Xid JavaDoc;
8
9 /**
10  * Defines the means to manipulate FOS transaction and the FOS repository.
11  * @author S. Chassande-Barrioz, P. Déchamboux
12  */

13 public interface FosManager extends FosAttributeControler, FosLoggerFactory {
14     static final String JavaDoc SPECVERSION = "1.01";
15
16     void start() throws FosException;
17
18     void stop() throws FosException;
19
20     /**
21      * Initializes the root directory for storing files representing data
22      * objects. It removes all existing data files and creates all data for
23      * managing transactions. It must be performed before starting the FOS.
24      */

25     void initialize() throws FosException;
26
27     /**
28      * Gets all the Xid of distributed transaction that need to be recovered
29      * by a DTP monitor. This method can only be called once (recoverable XID
30      * are lost upon new calls).
31      * @return The array of Xid of transactions that need to be recovered.
32      */

33     Xid JavaDoc[] getXidForRecovery();
34
35     /**
36      * Creates a new FosTransaction for managing transactional I/Os with Data
37      * Object Files.
38      */

39     FosTransaction createTxContext() throws FosException;
40
41     /**
42      * Releases a FosTransaction. Useful if adding a transaction pool.
43      * @param txc The FosTransaction to be released.
44      */

45     void releaseTxContext(FosTransaction txc) throws FosException;
46 }
47
Popular Tags