THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
When a job (or user) requests the revision manager to take a latest snapshot, the list of currently running transactions is consulted. The lowest revision number minus 1 , among the list is used in the snapshot.
UML diagram
APIs
...
APIs
The APIs provided by the revision manager interface are:
Code Block |
---|
/**
* Initialize the revision manager.
*/
public void initialize(Properties properties);
/**
* Opens the revision manager.
*
* @throws IOException
*/
public void open() throws IOException;
/**
* Closes the revision manager.
*
* @throws IOException
*/
public void close() throws IOException;
/**
* Start the write transaction.
*
* @param table The name of table involved in the transaction.
* @param families The column families of table in which data will be written by the transaction.
* @return An instance of Transaction
* @throws IOException
*/
public Transaction beginWriteTransaction(String table, List<String> families)
throws IOException;
/**
* Start the write transaction.
*
* @param table The name of table involved in the transaction.
* @param families The column families of table in which data will be written by the transaction.
* @param keepAlive The duration ( in milliseconds) after which the transaction will expire.
* @return An instance of Transaction
* @throws IOException
*/
public Transaction beginWriteTransaction(String table,
List<String> families, long keepAlive) throws IOException;
/**
* Commit the write transaction.
*
* @param transaction An instance of Transaction to be committed.
* @throws IOException
*/
public void commitWriteTransaction(Transaction transaction)
throws IOException;
/**
* Abort the write transaction.
*
* @param transaction An instance of Transaction to be aborted.
* @throws IOException
*/
public void abortWriteTransaction(Transaction transaction)
throws IOException;
/**
* Create the latest snapshot of the table.
*
* @param tableName The name of the table to create a snapshot.
* @return An instance of TableSnapshot.
* @throws IOException
*/
public TableSnapshot createSnapshot(String tableName) throws IOException;
/**
* Create the snapshot of the table using the revision number.
*
* @param tableName The name of the table to create a snapshot.
* @param revision The revision number to be used.
* @return An instance of TableSnapshot.
* @throws IOException
*/
public TableSnapshot createSnapshot(String tableName, long revision)
throws IOException;
/**
* Extends the expiration of a transaction by the time indicated by keep alive.
*
* @param transaction An instance of Transaction.
* @throws IOException
*/
public void keepAlive(Transaction transaction) throws IOException;
|