All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface JavaTransaction.ResourceManager

public interface ResourceManager
extends Remote
Distributed Transaction System in Java. Class: ResourceManager Description: necessary ResourceManager interface.


Method Index

 o abort(int)
Abort transaction.
 o addCars(int, String, int, int)
Addition and deletion of cars.
 o addFlight(int, int, int, int)
Add seats to a flight.
 o addRooms(int, String, int, int)
Add rooms to a location.
 o commit(int)
Commit transaction.
 o deleteCars(int, String, int)
 o deleteCustomer(int)
 o deleteFlight(int, int)
Delete the entire flight.
 o deleteRooms(int, String, int)
Delete Rooms from a location.
 o newCustomer()
 o queryCars(int, String)
 o queryCarsPrice(int, String)
 o queryCustomerInfo(int)
 o queryFlight(int, int)
 o queryFlightPrice(int, int)
 o queryRooms(int, String)
 o queryRoomsPrice(int, String)
 o reserveCar(int, int, String)
 o reserveFlight(int, int, int)
 o reserveRoom(int, int, String)
 o selfDestruct(int)
Call exit after a specified number of disk writes.
 o shutdown()
Shutdown gracefully.
 o start()
Start transaction.

Methods

 o start
 public abstract int start() throws RemoteException
Start transaction. Returns: a unique transaction ID.

 o commit
 public abstract boolean commit(int transactionId) throws RemoteException
Commit transaction. Returns: success.

 o abort
 public abstract void abort(int transactionId) throws RemoteException
Abort transaction. Returns: nothing, but this may change.

 o addFlight
 public abstract boolean addFlight(int Xid,
                                   int flightNum,
                                   int flightPrice,
                                   int flightSeats) throws RemoteException
Add seats to a flight. In general this will be used to create a new flight, but it should be possible to add seats to an existing flight. Adding to an existing flight should overwrite the current price of the available seats. Returns: success.

 o deleteFlight
 public abstract boolean deleteFlight(int Xid,
                                      int flightNum) throws RemoteException
Delete the entire flight. deleteflight implies whole deletion of the flight. all seats, all reservations. It's undecided what will happen if a customer has a reservation on this flight, but one possibility is to delete the customer as well. The other possibility is to return failure. Returns: success.

 o addRooms
 public abstract boolean addRooms(int Xid,
                                  String location,
                                  int numRooms,
                                  int price) throws RemoteException
Add rooms to a location. This should look a lot like addFlight, only keyed on a string location instead of a flight number.

 o deleteRooms
 public abstract boolean deleteRooms(int Xid,
                                     String location,
                                     int numRooms) throws RemoteException
Delete Rooms from a location. This subtracts from the available room count without allocating the rooms to a customer. It should fail if it would make the count of available rooms negative. Returns: success

 o addCars
 public abstract boolean addCars(int Xid,
                                 String location,
                                 int numCars,
                                 int price) throws RemoteException
Addition and deletion of cars. Cars have the same semantics as hotels.

 o deleteCars
 public abstract boolean deleteCars(int Xid,
                                    String location,
                                    int numCars) throws RemoteException
 o shutdown
 public abstract boolean shutdown() throws RemoteException
Shutdown gracefully. When this RM restarts, it should not attempt to recover its state if the client called shutdown to terminate it. Returns: success

 o selfDestruct
 public abstract boolean selfDestruct(int diskWritesToWait) throws RemoteException
Call exit after a specified number of disk writes. Support for this method requires a wrapper around the system's write to disk command that decrements the counter set by this method. This counter should default to 0, which implies that the wrapper will do nothing. If the count is non-zero, the wrapper should decrement the counter, see if it becomes zero, and if so, call exit(), otherwise continue the write. This method is not part of a transaction. Returns: success

 o queryFlight
 public abstract int queryFlight(int Xid,
                                 int flightNumber) throws RemoteException
 o queryFlightPrice
 public abstract int queryFlightPrice(int Xid,
                                      int flightNumber) throws RemoteException
 o queryRooms
 public abstract int queryRooms(int Xid,
                                String location) throws RemoteException
 o queryRoomsPrice
 public abstract int queryRoomsPrice(int Xid,
                                     String location) throws RemoteException
 o queryCars
 public abstract int queryCars(int Xid,
                               String location) throws RemoteException
 o queryCarsPrice
 public abstract int queryCarsPrice(int Xid,
                                    String location) throws RemoteException
 o queryCustomerInfo
 public abstract String queryCustomerInfo(int customer) throws RemoteException
 o newCustomer
 public abstract int newCustomer() throws RemoteException
 o deleteCustomer
 public abstract boolean deleteCustomer(int customer) throws RemoteException
 o reserveFlight
 public abstract boolean reserveFlight(int Xid,
                                       int customer,
                                       int flightNumber) throws RemoteException
 o reserveCar
 public abstract boolean reserveCar(int Xid,
                                    int customer,
                                    String location) throws RemoteException
 o reserveRoom
 public abstract boolean reserveRoom(int Xid,
                                     int customer,
                                     String location) throws RemoteException

All Packages  Class Hierarchy  This Package  Previous  Next  Index