Rev 1310 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/*
BERSERK - a BusinEss Runtime and SEcurity Resources Kit
Copyright (C) 2003 Goncalo Luiz
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
To contact Goncalo Luiz use the following e-mail address (use an @ instead of the _):
gedl_mega.ist.utl.pt
*/
/*
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
*
*
* Created at 19/Out/2003 , 11:56:37
*
*/
package pt.utl.ist.berserk.storage;
import pt.utl.ist.berserk.storage.exceptions.StorageException;
import java.util.List;
/**
* Specifies the mandatory funcionalities for a Transaction Broker
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt
*
*
* Created at 19/Out/2003 , 11:56:37
*
*/
public interface ITransactionBroker
{
/**
* Starts a transaction against the persistence layer
* @throws StorageException if a problem occurs with the persistence layer
*/
public boolean isTransactionActive
() throws StorageException
;
/**
* Starts a transaction against the persistence layer
* @throws StorageException if a problem occurs with the persistence layer
*/
public void beginTransaction
() throws StorageException
;
/**
* Commits a transaction against the persistence layer
* @throws StorageException if a problem occurs with the persistence layer. These problems
* include keys violations, timeouts ...
*/
public void commitTransaction
() throws StorageException
;
/**
* Aborts a transaction against the persistence layer
* @throws StorageException if a problem occurs with the persistence layer
*/
public void abortTransaction
() throws StorageException
;
/**
* Locks all the objects of a list for reading.
* @throws StorageException if a problem occurs with the persistence layer
*/
public void lockRead
(5+0%2Fdocs%2Fapi+List">List list
) throws StorageException
;
/**
* Locks the object for reading
* @throws StorageException if a problem occurs with the persistence layer
*/
public void lockRead
(5+0%2Fdocs%2Fapi+Object">Object obj
) throws StorageException
;
/**
* Locks the object for writing. Writes include deletions.
* @throws StorageException if a problem occurs with the persistence layer
*/
public void lockWrite
(5+0%2Fdocs%2Fapi+Object">Object obj
) throws StorageException
;
}